View Single Post
  #4   Report Post  
Posted to microsoft.public.excel.misc
T. Valko T. Valko is offline
external usenet poster
 
Posts: 15,768
Default complex formula does something simple?

Ooops! Made a mistake:

This non-array formula will do the same thing:
=IF(COUNTIF(M1:M141,"=")=40,0,COUNTIF(M1:M141,"=" ))


Should be:

=IF(COUNTIF(M1:M141,"=")=39,0,COUNTIF(M1:M141,"=") )

--
Biff
Microsoft Excel MVP


"T. Valko" wrote in message
...
Doesn't this formula essentially count the blanks in M1:M141
and compare that number to the number of rows between
E101 and E141?


Essentially, yes, but it's overly complex. It counts empty cells, not
necessarily "blank" cells. For example, it doesn't count cells that
contain formula blanks (""). This non-array formula will do the same
thing:

=IF(COUNTIF(M1:M141,"=")=40,0,COUNTIF(M1:M141,"=") )

I can't figure out why, in the original formula, they're subtracting 1:

ABS(ROW(E101)-ROW(E141))-1

--
Biff
Microsoft Excel MVP


"Dave F" wrote in message
ups.com...
{=IF(SUM(--ISBLANK(M1:M141))-(ABS(ROW(E101)-ROW(E141))-1)<0,SUM(--
ISBLANK(M1:M141)),0)}

(Entered as an array formula.)

If the count of blank cells in M1:M141 minus (141-101) < 0, then
count the blanks in M1:M141, else enter 0.

Doesn't this formula essentially count the blanks in M1:M141 and
compare that number to the number of rows between E101 and E141?

Found in a workbook I'm auditing...