Home |
Search |
Today's Posts |
#1
|
|||
|
|||
Multiple COUNTIF formula
Hi
Can anyone assist with a multiple COUNTIF formula. I basically want to count two values in a range of cells. At the moment Im putting in entering something like - =COUNTIF(C:C,"XXXX") AND COUNTIF(C:C,"YYYY"). However, this is not working so Im assuming I should be using a command other than 'AND' to link them. Any help advice appreciate. Thanks in advance! |
#2
|
|||
|
|||
A few ways:
To follow your lead, try this: =COUNTIF(C:C,"XXXX")+COUNTIF(C:C,"YYYY") To combine them, use the Sum() finction: =SUM(COUNTIF(C:C,{"XXXX","YYYY"})) Or, the ever popular<g SumProduct(): =SUMPRODUCT(--(C1:C1000={"XXXX","YYYY"})) -- HTH, RD ============================================== Please keep all correspondence within the Group, so all may benefit! ============================================== "JaB" wrote in message ... Hi Can anyone assist with a multiple COUNTIF formula. I basically want to count two values in a range of cells. At the moment Im putting in entering something like - =COUNTIF(C:C,"XXXX") AND COUNTIF(C:C,"YYYY"). However, this is not working so Im assuming I should be using a command other than 'AND' to link them. Any help advice appreciate. Thanks in advance! |
#3
|
|||
|
|||
Forgot to mention that SumProduct cannot use entire column references (C:C).
-- Regards, RD --------------------------------------------------------------------------- Please keep all correspondence within the NewsGroup, so all may benefit ! --------------------------------------------------------------------------- "RagDyer" wrote in message ... A few ways: To follow your lead, try this: =COUNTIF(C:C,"XXXX")+COUNTIF(C:C,"YYYY") To combine them, use the Sum() finction: =SUM(COUNTIF(C:C,{"XXXX","YYYY"})) Or, the ever popular<g SumProduct(): =SUMPRODUCT(--(C1:C1000={"XXXX","YYYY"})) -- HTH, RD ============================================== Please keep all correspondence within the Group, so all may benefit! ============================================== "JaB" wrote in message ... Hi Can anyone assist with a multiple COUNTIF formula. I basically want to count two values in a range of cells. At the moment Im putting in entering something like - =COUNTIF(C:C,"XXXX") AND COUNTIF(C:C,"YYYY"). However, this is not working so Im assuming I should be using a command other than 'AND' to link them. Any help advice appreciate. Thanks in advance! |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
countif formula | Excel Discussion (Misc queries) | |||
COUNTIF formula problems | Excel Discussion (Misc queries) | |||
Creating an EXCEL COUNTIF formula for a range of values | Excel Discussion (Misc queries) | |||
use a date range as criteria in a countif formula | Excel Worksheet Functions | |||
How do I create a formula in Excel that will countif or sumif bef. | Excel Worksheet Functions |