View Single Post
  #3   Report Post  
Posted to microsoft.public.excel.worksheet.functions
Biff Biff is offline
external usenet poster
 
Posts: 1,688
Default How can I change all negative values in a column to = 0?

Hi!

To get the average that excludes negative values *AND* zero values:

Both formulas entered as an array using the key combination of
CTRL,SHIFT,ENTER (not just ENTER):

=AVERAGE(IF(A1:A100,A1:A10))

To exclude negatives *BUT* include zero's:

=AVERAGE(IF((ISNUMBER(A1:A10))*(A1:A10=0),A1:A10) )

Biff

"dbsavoy" wrote in message
...
I'm trying to calculate an average of data, but need to ignore negative
numbers in the range from which I'm taking the average. I'd like to
either
format cells to calculate based on displayed values rather than actual
values
OR use something like an IF function to change negative values into zeros
or
NA.

I would much appreciate any help on this.
Thx!