Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
Booweezie
 
Posts: n/a
Default Complex or Conditional Countif(s)

I'm needing to count stuff in a column based on a condition in another
column. Here's my example:

Reasons
Plant A B C D E

102 X
999 X
102 X
102 X

I want to set up a matrix where I count each reason by Plant.........so.....
For Reason #A - My count for 102 would be 2 and for 999 would be 1
For Reason #C - My count for 102 would be 1 and for 999 would be 0

Does anyone know of a formula to use; I'm stumped.

Thanks.

Booweezie
  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
pdberger
 
Posts: n/a
Default Complex or Conditional Countif(s)

Boo -- Here's one approach. Tried it -- seems to work
A B C D E
1 Reasons
2 A B C
3 102 X
4 999 X
5 102 X
6 102 X
7
8 102 Formula here
9 999

In cell C8, put the following formula:
=SUMPRODUCT(--($C$3:$C$6="X"),(--($A$3:$A$6=A8)))

You can copy it down to C9.

There's lots more powerful tools -- Filtering, PivotTables, etc. But this
is an easy way.



"Booweezie" wrote:

I'm needing to count stuff in a column based on a condition in another
column. Here's my example:

Reasons
Plant A B C D E

102 X
999 X
102 X
102 X

I want to set up a matrix where I count each reason by Plant.........so.....
For Reason #A - My count for 102 would be 2 and for 999 would be 1
For Reason #C - My count for 102 would be 1 and for 999 would be 0

Does anyone know of a formula to use; I'm stumped.

Thanks.

Booweezie

  #3   Report Post  
Posted to microsoft.public.excel.worksheet.functions
Peo Sjoblom
 
Posts: n/a
Default Complex or Conditional Countif(s)

=SUMPRODUCT(--(A2:A50=102),--(B2:B50<""))

where A2:A50 is the plant range and B2:B50 reason A range

if you are using X you can change it to

=SUMPRODUCT(--(A2:A50=102),--(B2:B50="X"))

replace 102 with

=SUMPRODUCT(--(A2:A50=H1),--(B2:B50<""))

where you put the plant number in H1



--

Regards,

Peo Sjoblom

http://nwexcelsolutions.com


"Booweezie" wrote in message
...
I'm needing to count stuff in a column based on a condition in another
column. Here's my example:

Reasons
Plant A B C D E

102 X
999 X
102 X
102 X

I want to set up a matrix where I count each reason by
Plant.........so.....
For Reason #A - My count for 102 would be 2 and for 999 would be 1
For Reason #C - My count for 102 would be 1 and for 999 would be 0

Does anyone know of a formula to use; I'm stumped.

Thanks.

Booweezie



  #4   Report Post  
Posted to microsoft.public.excel.worksheet.functions
Booweezie
 
Posts: n/a
Default Complex or Conditional Countif(s)

pdberger - You're a peach!
That's exactly what I needed and it works perfectly!
Check's in the mail!

~~Booweezie
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
Conditional Format Not Working KMH Excel Discussion (Misc queries) 0 December 22nd 05 05:32 PM
complex conditional format TUNGANA KURMA RAJU Excel Discussion (Misc queries) 6 November 3rd 05 04:53 AM
complex conditional formulas in excel using "IF" jdmas Excel Worksheet Functions 2 August 20th 05 05:49 AM
complex?? Q about Conditional formatting AngelaG Excel Worksheet Functions 0 August 18th 05 08:16 PM
Complex Conditional formulas Aileyan Excel Worksheet Functions 1 November 29th 04 06:32 PM


All times are GMT +1. The time now is 12:46 PM.

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"