Thread: Average, IF
View Single Post
  #4   Report Post  
JMS
 
Posts: n/a
Default Average, IF

Thanks Bob, but that didn't quite get it.
What I have is a situation where I have each month of the year & enter
values based on a number of response each month. Some months may have
activity and have a number, other may have no activity and have 0 - ex:
Jan A1 10
Feb A2 20
Mar A3 0

Apr A4 10
May A5 20
Jun A6 30
etc....

Your suggestion returned the average for the given quarter even if the third
month had not been filled in yet. I want to wait to perform the average
until either a whole number or a 0 are entered.

Thanks for your help with this.

"Bob Phillips" wrote:

Just use

=AVERAGE(IF(A1:A3<"",A1:A3)

which is an array formula, so commit with Ctrl-Shift-Enter.

If the cells will contain 0, then use

=AVERAGE(IF(A1:A3<0,A1:A3)

instead

--

HTH

RP
(remove nothere from the email address if mailing direct)


"JMS" wrote in message
...
I'm trying to write a formula to return the AVERAGE by calendar quarter,

IF
the quarter has ended.
For instance, IF Jan = 5, Feb = 20, Mar 5, Average would be 10.
But, if Mar was 0 (only meaning no activity) I still need it to calculate.

The formula I started with is -
=IF(A1=0,0,AVERAGE(A1:A3)

This works only if cells A1:A3 have a value greater than 0. How can I

write
the formula so that as long as A3 is not blank that it will return the
AVERAGE?

Thanks!