formula for counting the occurence of more than one condition

D

Dr Carl

I'm using Excel 2003 (Windows XP) and have been unsuccessfully attempting to
count the occurence of more than one condition (I used the formula found in
HELP). I always end up with VALUE! whether I'm on a PC or my Mac. So I
designed my own formula that works on both platforms:

=SUM(COUNTIF(range,"1st criterion")+COUNTIF(range,"2nd criterion"))


----------------
This post is a suggestion for Microsoft, and Microsoft responds to the
suggestions with the most votes. To vote for this suggestion, click the "I
Agree" button in the message pane. If you do not see the button, follow this
link to open the suggestion in the Microsoft Web-based Newsreader and then
click "I Agree" in the message pane.

http://www.microsoft.com/office/com...dg=microsoft.public.excel.worksheet.functions
 
T

T. Valko

Another way to write the same formula:

=SUM(COUNTIF(range,{"1st criterion","2nd criterion"}))

If the criteria is TEXT:

=SUM(COUNTIF(range,{"red","green"}))

If the criteria is numeric:

=SUM(COUNTIF(range,{10,20}))
 

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