Countif

chemexhants

New Member
Joined
Jul 12, 2011
Messages
16
I am attempting to use the COUNTIF function to count the number of cells in a column containing '0' (zero) but the command also counts cells containing a number including a zero, eg. 82.90.

Is there an easy way to get around this or should I be using a different function?

I am using Excel 2007 and XP.

Stephen
 
Can I ask why they contain hyperlinks if they are values?
 
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
Thought this was the way to show data on one worksheet that was automatically copied from another :confused:. Is there a better command to do this?
 
Upvote 0
If you just want to link to a cell on another sheet, it's just:
='Sheet name'!A1
for example.
 
Upvote 0
Again, thank you for your patience.

I have used the formula suggested. This provides blank cells where the original data is zero. If I use =COUNTIF(range,0) it still counts all cells where the numbers end with zero. If I use =COUNTBLANK(range) I get a dash.
 
Upvote 0
Any chance you can post a (suitably censored) workbook somewhere (eg box.net) as I think something must be getting lost in translation.
 
Upvote 0
On your sample sheet, =COUNTIF(C8:C18,0) returns 4 as it should (remembering there are 3 hidden rows, which return 0).
 
Upvote 0
Yes:
=SUM(IF(SUBTOTAL(103,OFFSET(C8:C18,ROW(C8:C18)-MIN(ROW(C8:C18)),,1)),IF(C8:C18=0,1,0),""))

needs to be entered with Ctrl+Shift+Enter rather than just Enter (you should see the formula get enclosed in {} but you don't type those yourself)
 
Upvote 0

Forum statistics

Threads
1,224,587
Messages
6,179,735
Members
452,939
Latest member
WCrawford

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