View Single Post
  #8   Report Post  
Posted to microsoft.public.excel.programming
Rick Rothstein Rick Rothstein is offline
external usenet poster
 
Posts: 5,934
Default How to calculate the number of non-zero cells in range?

Maybe this array-entered** formula....

=INDEX(B1:B25,MAX(ROW(B12:B25)*(B12:B25<"")*(B12: B25<0)))

**commit formula using Ctrl+Shift+Enter, not just Enter by itself

Hello,

Why not just
=LOOKUP(2,1/(B1:B25<""),B1:B25)
?

(non-array formula)


Probably because I answered that post at 4:15 in the morning (just before I
was going to sleep).<g

Thanks for following up on this.

--
Rick (MVP - Excel)