View Single Post
  #5   Report Post  
Posted to microsoft.public.excel.worksheet.functions
ShaneDevenshire ShaneDevenshire is offline
external usenet poster
 
Posts: 2,344
Default Help Please! CountIf Function using 2 criteria?

Hi,

If you are using 2007

=COUNTIFS(D$1:D$7,"Detox",E$1:E$7,"Client was admitted.")

If you are using 2003

=SUMPRODUCT(--(D$1:D$7=B$1),--(E$1:E$7=C$1))

where B1 contains "Detox" and C1 contains "Client was admitted." Both
without quotes. I could have used cell references in the 2007 formula, and
it is generally more flexible.

--
Thanks,
Shane Devenshire


"AlexisLovesLife" wrote:

Allright...I tried to work through this using all the other posts as
references, but was unable to make it work for my situation.

I need to be able to "countif" Column D says "Detox" *AND* Column E says
"Client was admitted."

Or when Column D says "Rehab" *AND* Column E says "Client was not admitted."

Any help from anyone!? You guys make this stuff seem so simple! It's
*amazing* to me!

Thanks so much in advance! :)