Count rows where specific columns are not blank

cr731

Well-known Member
Joined
Sep 17, 2010
Messages
611
I have an input table where three columns are required. I would like to write a formula to check the number of rows that contain a blank in any one of those columns. I am interested to know if this can be done without a helper column and have a single formula. I thought SUMPRODUCT could be used but I haven't been able to get it to work.

Here is an example,

[TABLE="class: grid, width: 500"]
<tbody>[TR]
[TD]Col1[/TD]
[TD]Col2[/TD]
[TD]Required 1[/TD]
[TD]Required 2[/TD]
[TD]Required 3[/TD]
[/TR]
[TR]
[TD]xxx[/TD]
[TD]xxx[/TD]
[TD]zzz[/TD]
[TD]yyy[/TD]
[TD][/TD]
[/TR]
[TR]
[TD]xxx[/TD]
[TD]xxx[/TD]
[TD]aaa[/TD]
[TD]bbb[/TD]
[TD]ccc[/TD]
[/TR]
[TR]
[TD]xxx[/TD]
[TD]xxx[/TD]
[TD]fff[/TD]
[TD][/TD]
[TD]ddd[/TD]
[/TR]
</tbody>[/TABLE]

So the formula should check that in required columns 1, 2, 3 if any value in any row is blank. The formula should return 2 in the above example, for rows 1 and 3.

Maybe it isn't worth the hassle and I know I could just add a column of COUNTA(Required 1: Required 3) = 0 but just curious to see if it can be done without it.

Thanks
 

Excel Facts

Best way to learn Power Query?
Read M is for (Data) Monkey book by Ken Puls and Miguel Escobar. It is the complete guide to Power Query.
How about something like this:
Code:
=COUNTA(A2:A10) - SUMPRODUCT(--(C2:C10<>""),--(D2:D10<>""),--(E2:E10<>""))
Basically, I am just subtracting the number of rows with all three columns filled in from the total number of rows, to get the number of rows missing at least one entry.
 
Last edited:
Upvote 0

Forum statistics

Threads
1,223,228
Messages
6,170,871
Members
452,363
Latest member
merico17

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