Using Countifs to count range of blank and non blank cell based on condition

Tennisguuy

Well-known Member
Joined
Oct 17, 2007
Messages
564
Office Version
  1. 2016
Platform
  1. Windows
I want to count the number of times where a group of cells are blank AND a group of another cells are not blank. In cells J13:L212 I want to count the number of cells that are blank AND in cells M13:O212 I want to count the number of time the cells are not blank if the value in cells I13:I212 is equal to A.

For example if there is a "A" in cell I13 and the cells are blank in J13:L13 but the cells in M13:013 are not blank the count should be 1 since there was a value say cell N13.

I tried this formula but it didn't work
IFERROR(COUNTIFS($I$13:$I$212,"A",$J$13:$L$212,"=",$M$13:$O$212,"<>"),0)
 

Excel Facts

How to show all formulas in Excel?
Press Ctrl+` to show all formulas. Press it again to toggle back to numbers. The grave accent is often under the tilde on US keyboards.
With countifs or similar functions all ranges must be equal size in the number of rows and columns. You have one range with a single column while the other ranges have 3 columns which is why your formula is not working.
blank in J13:L13 but the cells in M13:013 are not blank the count should be 1 since there was a value say cell N13.
Finding a formula that will work depends on how these 2 groups of cells should be compared, the devil is in the (very fine) details. Are you saying that all 3 cells in J13:L13 should be blank with 1 or more cells in M13:O13 not blank, or that J13 should be compared only to M13, K13 compared to N13 and L13 to O13?
 
Upvote 0
Yes I am saying the all three cells in J13:L13 should be blank and anyone of the cells in N13:O13 are not blank and if that is true cell I13 must be an A but I13 does not need to be compared to anything
 
Upvote 0
Try
Excel Formula:
=SUMPRODUCT(($I$13:$I$212="A")*($J$13:$J212="")*($K$13:$K212="")*($L$13:$L212="")*((($M$13:$M$212<>"")+($N$13:$N$212<>"")+($O$13:$O$212<>""))>0))
 
Upvote 0
Thank Jason that worked perfectly. Really appreciate your help
 
Upvote 0

Forum statistics

Threads
1,214,606
Messages
6,120,484
Members
448,967
Latest member
visheshkotha

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