Ignore Blank Cells When Using Cell References as COUNTIFS criteria?

bluenova8413

New Member
Joined
Sep 10, 2019
Messages
2
Hello - I'm trying to write a COUNTIFS formula that includes multiple cell references as criteria. However, if one or more of these cells is left blank, I would like the COUNTIFS criteria to be excluded.

In my example sheet - the formula in G13 includes criteria referenced G6:G8. But since I have left G6 blank, I just want the formula to narrow the count by the criteria in G7 & G8.

Is there a way to do this? Thank you!

1692066081352.png
 

Excel Facts

Format cells as currency
Select range and press Ctrl+Shift+4 to format cells as currency. (Shift 4 is the $ sign).
Hi,
you can include an if in the countif:
Excel Formula:
=countifs(D2:D22,"WIN",a2:a22,if(g6<>"",g6,"<>"),B2:B22,G7,C2:C22,G8)
the <> will then include any non-blank values. Would be a bit trickier if you had any blanks in column A that you wanted to count
Also a side note, in the countifs you don't need the "="& as that's implied.
 
Last edited:
Upvote 0
Solution

Forum statistics

Threads
1,223,234
Messages
6,170,891
Members
452,366
Latest member
TePunaBloke

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