Counting non-blank cells with conditions

S

Saylindara

I have the following:

Referral received Appointment sent
3/8/09 31/8/09
4/8/09 2/9/09
5/8/09
2/9/09
3/9/09 4/9/09
5/9/09

I would like to count the number of appointments that were sent for
referrals received in each month, e.g. for August it would be 2 and for
September 1.

Is that possible?
 
L

Luke M

something like this:

=SUMPRODUCT(--(MONTH(A2:A10)=8),--(ISNUMBER(B2:B10)))

Note that you can't callout entire columns (A:A) in SUMPRODUCT unless using
XL 2007. Feel free to change the "8" to a cell reference, if desired.
 
P

p45cal

something along the lines of
=SUMPRODUCT((MONTH($A$2:$A$7)=8)*($B$2:$B$7<>""))
where the 8 represents August.
See attached for a working example with small modification.
Note that if there is more than 1 year in the first column then the
count for each month will include that month from all the years in one
value.


+-------------------------------------------------------------------+
|Filename: Conditional count.xls |
|Download: http://www.thecodecage.com/forumz/attachment.php?attachmentid=222|
+-------------------------------------------------------------------+
 
S

Saylindara

This worked perfectly thank you

Luke M said:
something like this:

=SUMPRODUCT(--(MONTH(A2:A10)=8),--(ISNUMBER(B2:B10)))

Note that you can't callout entire columns (A:A) in SUMPRODUCT unless using
XL 2007. Feel free to change the "8" to a cell reference, if desired.
--
Best Regards,

Luke M
*Remember to click "yes" if this post helped you!*
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top