View Single Post
  #8   Report Post  
Posted to microsoft.public.excel.worksheet.functions
Debbie
 
Posts: n/a
Default countif with non-continous ranges

aaahh, THANK YOU very much for explaining this way, now I understand!

Peo Sjoblom wrote:
It's because you aren't really using multiple ranges

=COUNTIF(U5:U10:U12:U17,"3.028")

is the same as

=COUNTIF(U5:U17,"3.028")

you can test that by putting 3.028 in U11 and notice that it will be
counted, but

=SUM(COUNTIF(INDIRECT({"U5:U10","U12:U17"}),3.028 ))

will not count 3.028 in U11

but if U11 is blank the result would be the same

It's funny I get the same results no matter what formula I use the one you
sent and mine, I just look at mine and it doesn't appear logical...

[quoted text clipped - 15 lines]
=COUNTIF(U5:U10:U12:U17,"3.028")/COUNTA(U5:U10,U12:U17)
Thanks so much for your help.