ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Worksheet Functions (https://www.excelbanter.com/excel-worksheet-functions/)
-   -   formula for counting the occurence of more than one condition (https://www.excelbanter.com/excel-worksheet-functions/172195-formula-counting-occurence-more-than-one-condition.html)

Dr Carl

formula for counting the occurence of more than one condition
 
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/comm...et.f unctions

Pete_UK

formula for counting the occurence of more than one condition
 
You don't really need the SUM( ) part.

Pete

On Jan 8, 8:21*pm, Dr Carl <Dr wrote:
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/comm....mspx?mid=0008...



T. Valko

formula for counting the occurence of more than one condition
 
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}))

--
Biff
Microsoft Excel MVP


"Dr Carl" <Dr wrote in message
...
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/comm...et.f unctions




All times are GMT +1. The time now is 04:54 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com