#1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 15
Default #DIV/0!

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?
  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 3,355
Default #DIV/0!

How about

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

"quattda" wrote:

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?

  #3   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 15
Default #DIV/0!

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.

"Barb Reinhardt" wrote:

How about

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

"quattda" wrote:

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?

  #4   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 1,231
Default #DIV/0!

"Barb Reinhardt" wrote...
How about

=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.


Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On



All times are GMT +1. The time now is 08:27 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"