Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
JaB
 
Posts: n/a
Default 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   Report Post  
RagDyer
 
Posts: n/a
Default

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   Report Post  
RagDyer
 
Posts: n/a
Default

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
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
countif formula Todd Nelson Excel Discussion (Misc queries) 1 September 21st 05 11:27 PM
COUNTIF formula problems artisanpp Excel Discussion (Misc queries) 2 June 5th 05 01:30 AM
Creating an EXCEL COUNTIF formula for a range of values Pat Walsh Excel Discussion (Misc queries) 5 January 21st 05 02:57 PM
use a date range as criteria in a countif formula mbparks Excel Worksheet Functions 3 January 2nd 05 11:06 PM
How do I create a formula in Excel that will countif or sumif bef. bkclark Excel Worksheet Functions 4 November 10th 04 05:30 PM


All times are GMT +1. The time now is 03:24 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"