Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 1
Default Help Please! CountIf Function using 2 criteria?

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! :)
  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 11,058
Default Help Please! CountIf Function using 2 criteria?

Use SUMPRODUCT()

=SUMPRODUCT((D1:D100="Detox")*(E1:E100="Client was admitted"))

etc.
--
Gary''s Student - gsnu200810


"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! :)

  #3   Report Post  
Posted to microsoft.public.excel.worksheet.functions
Max Max is offline
external usenet poster
 
Posts: 9,221
Default Help Please! CountIf Function using 2 criteria?

To get the hang of it ..

.. to "countif" Column D says "Detox" *AND*
Column E says "Client was admitted."


=sumproduct((Col_D="Detox")*(Col_E="Client was admitted."))

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


=sumproduct((Col_D="Rehab")*(Col_E="Client was not admitted."))

Col_D, Col_E needs to be explicit ranges of equal size,
eg: D2:D100, E2:E100

And you can strap on more COUNTIF conditions beyond 2 conditions,
indicatively: =sumproduct((Cond1)*(Cond2)*(Cond3)*(Cond4))
--
Max
Singapore
http://savefile.com/projects/236895
Downloads:19,500 Files:362 Subscribers:62
xdemechanik
---
  #4   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 1,766
Default Help Please! CountIf Function using 2 criteria?

Hi,

You may also try using the following array formula (Ctrl+Shift+Enter)

=sum(if((range1="Detox")*(range2=Client was admitted"),1))

--
Regards,

Ashish Mathur
Microsoft Excel MVP
www.ashishmathur.com

"AlexisLovesLife" wrote in
message ...
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! :)


  #5   Report Post  
Posted to microsoft.public.excel.worksheet.functions
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! :)

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
Using the CountIf function with multiple criteria? Jonathan Excel Worksheet Functions 11 January 9th 08 06:34 PM
Two Criteria with the COUNTIF function or somthing else? Robert Brown Excel Worksheet Functions 2 June 2nd 06 12:25 PM
COUNTIF or SUM function (Multiple criteria) HELP!! Australia Excel Worksheet Functions 3 September 19th 05 07:39 AM
countif function with multiple criteria Geoff Excel Discussion (Misc queries) 1 August 11th 05 11:50 PM
How do I create a COUNTIF function with more than one criteria? BCowans Excel Worksheet Functions 2 June 14th 05 08:04 PM


All times are GMT +1. The time now is 04:07 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"