CountIf or SumProduct except when variable is present

willdc

New Member
Joined
May 3, 2011
Messages
1
I am not finding a relevant thread already posted so hopefully someone can solve this. I am creating a dashboard of issues and creating a graph from the results.

=SUMPRODUCT(('Issue Log'!B3:B608="Corrective Action")+0)
is the same as
=COUNTIF('Issue Log'!B3:B608,B3) where B3 is Corrective Action

however I need to exclude from the count any row which also has any data in the J column

I have tried
=SUMPRODUCT(('Issue Log'!B3:B608="Corrective Action"),('Issue Log'!J3:J608<>"")+0)
but that returns a value of zero regardless of data in the Issue Log. Any ideas on what I am doing wrong?

thanks,Will
 

Excel Facts

Quick Sum
Select a range of cells. The total appears in bottom right of Excel screen. Right-click total to add Max, Min, Count, Average.
If you're using Excel 2007 or later, the best way is with COUNTIFS, which is the same as COUNTIF, except it allows multiple criteria. So, in your case, the formula would be:
=COUNTIFS(B3:B608, "Corrective Action", J3:J608, "")

If you're using an older version of Excel, you can use:
=SUMPRODUCT((B3:B608="Corrective Action")*(J3:J608=""))
which, is close to what you were doing.

Or =SUM(IF((B7:B17="Corrective Action")*(J7:J17=""), 1, 0))
(Confirm that with Ctrl+Shift+Enter.)
 
Upvote 0

Forum statistics

Threads
1,224,586
Messages
6,179,719
Members
452,939
Latest member
WCrawford

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
Back
Top