View Single Post
  #9   Report Post  
Posted to microsoft.public.excel.worksheet.functions
Dave Peterson Dave Peterson is offline
external usenet poster
 
Posts: 35,218
Default =COUNTIF(D4:D29,"0")

Good point.

Another alternative...
=COUNT(D4:D29)-COUNTIF(D4:D29,0)

Which will distiguish between text 0 ('0) and the number 0.

Jerry W. Lewis wrote:

=COUNTIF(D4:D29,"<0") will count anything not zero (empty cells, text,
booleans, errors, etc). It also behaves strangely on sheets where the last
row ever used is <29.

To count only positive or negative numbers, use
=COUNTIF(D4:D29,"0")+COUNTIF(D4:D29,"<0")

Jerry

"Dave Peterson" wrote:

Maybe...

=COUNTIF(D4:D29,"<0")



Mike wrote:

I need this formula to also count negative numbers


--

Dave Peterson


--

Dave Peterson