CountIF with multiple criteria

kjsab

Board Regular
Joined
Mar 16, 2007
Messages
63
I need assistsance with 2 different formulas.

In my spreadsheet,
Column A = Status
Column B = Assignee Individual.

Formula One...I need to calculate how many rows meet the criteria of Status = Active, and Assignee Individual is blank.

Formula Two...I need to calculate how many rows meet the criteria of Status = Active, and Assignee Individual is NOT blank.

Thanks!
 

Excel Facts

What is the shortcut key for Format Selection?
Ctrl+1 (the number one) will open the Format dialog for whatever is selected.

Brian from Maui

MrExcel MVP
Joined
Feb 16, 2002
Messages
8,459
I need assistsance with 2 different formulas.

In my spreadsheet,
Column A = Status
Column B = Assignee Individual.

Formula One...I need to calculate how many rows meet the criteria of Status = Active, and Assignee Individual is blank.

Formula Two...I need to calculate how many rows meet the criteria of Status = Active, and Assignee Individual is NOT blank.

Thanks!

Try,

=SUMPRODUCT(--(A2:A100="Active"),--(B2:B100=""))

For problem 2 change ="" to <>""
 

kjsab

Board Regular
Joined
Mar 16, 2007
Messages
63
Thank you

First off, thank you very much for the quick reply, this seemed to have worked but it was using a statement i have never seen before. What do the -- mean in the formula?
 

Scott Huish

MrExcel MVP
Joined
Mar 17, 2004
Messages
19,958
Office Version
  1. 365
  2. 2010
Platform
  1. Windows
They coerce the TRUE/FALSE values to 1 and 0 respectively as SUMPRODUCT works with numbers.
 

jongooligan

Board Regular
Joined
Jul 23, 2007
Messages
90
Hotpepper

I've been in the habit of doing it like this -

=SUMPRODUCT((A2:A100="Active")*(B2:B100=""))

Does the * operator have the same effect as -- ?

kjsab - sorry for hijacking your thread a bit
 

Scott Huish

MrExcel MVP
Joined
Mar 17, 2004
Messages
19,958
Office Version
  1. 365
  2. 2010
Platform
  1. Windows
My understanding is the -- format will calculate a bit faster.

This makes sense to me, as the native format of SUMPRODUCT is to work with arrays. The -- format, using the example above, creates two arrays that SUMPRODUCT can immediately work with, using * creates the additional calculation to create a single array from the two before SUMPRODUCT can work with it.
 

kjsab

Board Regular
Joined
Mar 16, 2007
Messages
63
Thanks to both of you. I learned some great new stuff out of this !!!
 

Forum statistics

Threads
1,181,053
Messages
5,927,848
Members
436,572
Latest member
khalid hussain

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Top