# Averaging without #DIV0!

M

#### Malcolm

Iâ€™m using a worksheet that has a cell (C27) that totals rooms and a cell
(J28) that totals rates and a cell (J29) that is the average daily rate
total, rate/total rooms. Iâ€™m using the formula =AVERAGE(J28/C27). The only
problem is until I actually input a number into C27 I get the #DIV/0!
displayed in my ADR cell (J29). I donâ€™t always need this data so is there a
way I can input the formula and not have the #DIV/0! in cell J29?
Thanks,
Malcolm

N

#### Noodnutt @ Work

G'day Malcolm

=IF(\$J28=0,0,AVERAGE(J28/C27))

HTH
Mark

K

#### Ken Hudson

Hi Malcolm,

One way...

=IF(ISERROR(AVERAGE(J28/C27)),"",J28/C27)

Ken Hudson

B

=if(c27=0,"",AVERAGE(J28/C27))

Z

#### Ziggy

G'day Malcolm

=IF(\$J28=0,0,AVERAGE(J28/C27))

HTH
Mark

- Show quoted text -

It think when you divide you already creat the average. You don't need
the AVERAGE function.

=IF(C27=0,0,J28/C27)

=IF(iserror(J28/C27),0,J28/C27)

in 2007; =IFERROR(J28.C27,0)

My preference runs to the if error formulas

Sig

Z

#### Ziggy

It think when you divide you already creat the average. You don't need
the AVERAGE function.

=IF(C27=0,0,J28/C27)

=IF(iserror(J28/C27),0,J28/C27)

in 2007;   =IFERROR(J28.C27,0)

My preference runs to the if error formulas

Sig- Hide quoted text -

- Show quoted text -

Should have been =IFERROR(J28/C27,0)

F

#### FSt1

hi
=IF(c27=0,0,average(j28/c27))
thought i haven't seen the average formula used quite that way.
but if c27 is zero then the above formual will put a zero in the cell

regards
FSt1

N

#### Noodnutt @ Work

D'oh

Seeing the trees through the forest..

Thx Ziggy

G'day Malcolm

=IF(\$J28=0,0,AVERAGE(J28/C27))

HTH
Mark

- Show quoted text -

It think when you divide you already creat the average. You don't need
the AVERAGE function.

=IF(C27=0,0,J28/C27)

=IF(iserror(J28/C27),0,J28/C27)

in 2007; =IFERROR(J28.C27,0)

My preference runs to the if error formulas

Sig

F

#### Fred Smith

Or, more simply:
=if(c27=0,"",j28/c27)

Regards,
Fred

M

#### Max

Think you don't need to use "average", and this simple IF trap which checks
the denominator cell should suffice:
=IF(C27="","",J29/C27)

M

#### Malcolm

FSt1, Hi, again,
Thank you and best regards,

Malcolm

M

#### Malcolm

Ziggy said:
It think when you divide you already creat the average. You don't need
the AVERAGE function.

=IF(C27=0,0,J28/C27)

=IF(iserror(J28/C27),0,J28/C27)

in 2007; =IFERROR(J28.C27,0)

My preference runs to the if error formulas

Sig

Sig, Hi,
Since I am using 2007, IFERROR does work great.
Thanks,
Malcolm