How to count number of cells with only ZEROS!

Ultimate Selector

Board Regular
Joined
Dec 15, 2013
Messages
153
I am stumped a bit on this one. I want to count the number of cells that have a ZERO (0) in them.
I do NOT want to count any blank cells, just the cells that contain a 0 in them within a range.

What is the formula for this?

Thanks in advance for any help on this!

Regards,
U.S. :cool:
 

Excel Facts

Test for Multiple Conditions in IF?
Use AND(test, test, test, test) or OR(test, test, test, ...) as the logical_test argument of IF.
What do you get when you try it? I've tried it, and so has MAIT, and it works for us. How is your data laid out?
 
Upvote 0
If your looking for a Vba solution.
Try this:
Looking in Range("A1:A10") For 0
Code:
Sub Count_Me()
'Modified  10/6/2018  7:09:44 PM  EDT
ans = Application.WorksheetFunction.CountIf(Range("A1:A10"), 0)
MsgBox ans
End Sub
 
Upvote 0
Sorry, I had to run out for min. My data is laid out left to right with formatting.


<colgroup><col width="39"></colgroup><tbody>
[TD="class: xl66, width: 39"]
=COUNTIF(k28:t28,0)[/TD]

</tbody>
[TABLE="width: 39"]
<colgroup><col width="39"></colgroup><tbody>[TR]
[TD="class: xl64, width: 39"]
=COUNTIF(k28:t28,0)[/TD]
[/TR]
</tbody>[/TABLE]
 
Upvote 0
This is my data layout ...

[TABLE="width: 468"]
<tbody>[TR]
[TD][/TD]
[TD]3[/TD]
[TD]2[/TD]
[TD]1 2[/TD]
[TD]1 2 3[/TD]
[TD]1[/TD]
[TD]1%[/TD]
[TD]1234[/TD]
[TD]5 10[/TD]
[TD]2%[/TD]
[TD]3%[/TD]
[TD][/TD]
[/TR]
[TR]
[TD]#1[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD]86[/TD]
[TD][/TD]
[TD][/TD]
[TD]#1[/TD]
[/TR]
[TR]
[TD]#2[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD]98[/TD]
[TD][/TD]
[TD][/TD]
[TD]#2[/TD]
[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TD]
[TD]9[/TD]
[TD]86[/TD]
[TD]21[/TD]
[TD]32[/TD]
[TD]24[/TD]
[TD]#10[/TD]
[/TR]
</tbody>[/TABLE]



* I want to count the number of cells that are blank. They do have zeros however but I blanked them out in my formatting.
The COUNTBLANK statement does not work either.
 
Last edited:
Upvote 0

Forum statistics

Threads
1,223,903
Messages
6,175,279
Members
452,630
Latest member
OdubiYouth

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