View Single Post
  #4   Report Post  
Posted to microsoft.public.excel.worksheet.functions
T. Valko T. Valko is offline
external usenet poster
 
Posts: 15,768
Default Average formula works but....

column totals with whole numbers end up with
a zero as the total.


Not sure what that means.

=IF(ISERROR(AVERAGE(IF(M6:M17<0,
M6:M17))),"0",AVERAGE(IF(M6:M17<0,M6:M17)))


When you quote numbers like "0" then Excel treats that as a TEXT string.
Remove the quotes so Excel treats it as a numer:

=IF(ISERROR(AVERAGE(IF(M6:M17<0, M6:M17))),0,AVERAGE(IF(M6:M17<0,M6:M17)))

Or:

=LOOKUP(1E100,CHOOSE({1,2},0,AVERAGE(IF(M6:M17<0, M6:M17))))

Both formula are array entered.

--
Biff
Microsoft Excel MVP


"acbel40" wrote in message
...
I'm using this formula =IF(ISERROR(AVERAGE(IF(M6:M17<0,
M6:M17))),"",AVERAGE(IF(M6:M17<0, M6:M17))) on a multiple column
spreadsheet....it works great....however, if one column has all
zero's...then
it returns a blank....I tried to change the formula to
=IF(ISERROR(AVERAGE(IF(M6:M17<0, M6:M17))),"0",AVERAGE(IF(M6:M17<0,
M6:M17))) inserting the 0 between the quotation marks; however, column
totals
with whole numbers end up with a zero as the total. Something is not
quite
right about the formula...or I need to add more to the formula? Help?