# #DIV/0!

G

#### Guest

I am working on a time sheet with Cell H3 being a sum of actual times
calculated from a range of other start and end time cells. If there is no
start/end times entered the return value in the cell is 0. I am then
calculating a wage value based on the expected time (H2) vs actual time (H3).
However, if there is no actual time value entered I get the #DIV/0! error
message. Obviously, this is because of the 0 in the denominator position.
I have used the formula: =IF(H3=0,12,(H2/H3)*12) to try to eliminate this
but I still get the error message. What am I doing wrong?

G

#### Guest

=IF(ISERROR(H2/H3),12,(H2/H3)*12)

G

#### Guest

That did it. I had tried using ISERROR before but had only entered the H3
cell designation instead of the ratio formula. As always, the answer is
obvious NOW. Thanks a lot.

H

#### Harlan Grove

Barb Reinhardt said:

=IF(ISERROR(H2/H3),12,(H2/H3)*12)
....

Usually not a good thing to hide errors that would propagate if either H2 or
H3 evaluated to errors. Usually just better to test whether H3 is nonzero.

=IF(H3,12*H2/H3,12)

This will return #VALUE! if H3 contains nonnumeric text.