Including blank cells in Countifs and Sumifs

PaulusPigus

New Member
Joined
May 28, 2019
Messages
9
I am using COUNTIFS with multiple criteria which must all be satisfied as follows:
=COUNTIFS(Dates,">="&Date, Sectors,"*"&Sector&"*",Countries,"*"&Country&"*",Regions,"*"&Region&"*",Categories, "*"&Category&"*", Risk_Score, ">="&Risk_Level, Sources, "*"&A14&"*")
Problem is that this does not count a record if any condition cells are blank, for example, if Country or Region is blank
So I am looking to count all records where each of the specified conditions is met or where the condition is not specified:

Specified conditions:
Picture2.png


Database fields (subset):
Picture1.png
. It seems that Sumproduct may be the answer but I can not work it through.

Linked to this, I want to sum the values in one column (Risk_Score), based on the same criteria. So I currently have:
=SUMIFS(Risk_Score,Dates,">="&Date,Sectors,"*"&Sector&"*",Countries,"*"&Country&"*",Regions, "*"&Region&"*",Categories, "*"&Category&"*", Risk_Score, ">="&Risk_Level, Sources, "*"&A14&"*")

Any help appreciated.

 
well, it may not work with it. we'll have to figure it out. You question is tough to me. so it will take me some time. but others may chime in if they want.
 
Upvote 0

Excel Facts

How to find 2nd largest value in a column?
MAX finds the largest value. =LARGE(A:A,2) will find the second largest. =SMALL(A:A,3) will find the third smallest
okay, maybe you can copy the sheet into a new workbook. but Your version of excel is important. Filter is not available to everyone.
Just wondering, is there a 'cheat' here - could I place some content in the 'blank' condition s=cells which would ensure that they are counted?
 
Upvote 0
If you could post some sample data as you have it in excel it would be great. The xl2bb add in is what you need for that.
 
Upvote 0

Forum statistics

Threads
1,224,272
Messages
6,177,634
Members
452,787
Latest member
BeeTH

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