View Single Post
  #4   Report Post  
Posted to microsoft.public.excel.misc
OssieMac OssieMac is offline
external usenet poster
 
Posts: 2,510
Default formula for hours on time sheet

The following formula always returns zero if the answer would otherwise be
negative.

=MAX(A1-B1,0)

--
Regards,

OssieMac


"Matt" wrote:

I have a time sheet that calculates start time and end time, neither of which
could be constant times. That formula works fine.
I am looking to take the total hours for any given day and break them down
into regular hours (upto and including 8 hrs) and overtime pay (anything over
8 hours).

The problem is that some days there might not be a full 8 hrs put in and
then the overtime hours result in an error.

The way I have it set up now is for OT to subtract 8hrs from the Total hrs.
and then the Regular time subtracts the OT hours (or minutes) from the Total
time.

How can I tell the OT formulat to do what I told it to but if the answer is
a negative number to just enter '0'?

Or is there an easier solution???

Can anyone assist me????