DIV/0 error

G

Guest

Hi all,

I need help on a formula. I have a cell Z3 which is YTD. It calcuates the
average from cells A3:Y3 (months of the year). So far so good. The cells
A3:Y3 contain average totals from the 4 weeks of the month. So cell Z3 is
calcuating all of the monthly averages which is working ok. The problem is if
I have not entered any weekly data for the future months I am getting the
#DIV/0 error and the YTD Z3 cell will not calcuate. I have tried using the
help solutions. But it looks like I can't use their solution because I am
using a range of cells. This is what I attempted:
=IF(A3:Y3="#DIV/0","",AVERAGE (A3:Y3)). I then get a value error.

Any ideas?? Any information is greatly appreciated!!!!!
 
D

Dave O

This solution may work for you- since you're using a simple average you
can change the formula to
SUMIF(range, "<>0", range) / COUNTIF(range,"<>0")

This sums non-zero values and divides by the number of non-zero values.
Use this ONLY on a continuous range of numbers, because
COUNTIF(range,"<>0") will count blank cells.
 
G

Guest

Hi Niek,

I entered =IF(ISERROR(AVERAGE(C3:Y3),"",AVERAGE(C3:Y3) and the cursor moves
to the "" quotes.
 
R

Randy Davis

I think the iserror formula will be simpler if you already have th
spreadsheet set up. Just make sure that A3 - Y3 have =if(iserror(
week average formula)," ",4 week average formula).
 
G

Guest

Hi,

In A3 enter the formula,

=IF(ISERROR(AVERAGE(4-week range for A3)),"",AVERAGE(4-week range for A3))

where "4-week range for A3" is the range of cells containing tthe data for
calculating the average in cell A3. Drag the formula across to Y3.

The formula in Z3 is =AVERAGE(A3:Y3). and it should behave properly.

Regards,
B. R. Ramachandran


In fact
 
G

Guest

Hi B.R.

I tried your solution and it works perfectly. You are the man...
Many thanks....
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Similar Threads


Top