View Single Post
  #7   Report Post  
Posted to microsoft.public.excel.misc
joeu2004[_2_] joeu2004[_2_] is offline
external usenet poster
 
Posts: 829
Default countif function

Errata.... I wrote:
B1: =INT(LOG(C1,2))-52-AND(B2<0,INT(C1)=C1)


Argh! I tried to get fancy with a last-minute edit without full thinking
about and testing it.

For now, just write:

B1: =INT(LOG(C1,2))-52

That will work "well enough" for all values in C1.

For powers of 2, we can a little better when B2<0. But the AND expression
failed to check for powers of 2 per se.

It can be done easily enough. But I suspect I am providing TMI and beating
a dead horse.