View Single Post
  #5   Report Post  
Posted to microsoft.public.excel.misc
DonB
 
Posts: n/a
Default Using an IF statement on time based data

I guess I didn't explain my problem very well. I have six colums of data
which have the daily beginning and ending times for the morning, afternoon,
and evening shifts of an employee. I want an IF statement that says if the
total time is 8 or more hours, the result is 8, else the total time spent.
The various permutations that I have tried return the result .46875 or an
error message. The problem seems to mixing time and number formats but I
can't be sure. Thanks for the reply.
--
DonB


"Dave Peterson" wrote:

=MIN(A1,TIME(8,0,0))

would be one way (with the time worked in A1)

DonB wrote:

I have a worksheet of payroll time data by date that i want to identify
overtime amounts in excess of 8 hours. I can't seem to write an IF statement
that correctly answers the question "If 8 hours or more, enter 8 hours, if
less then the the calculated time. It seems to be a formatting problem of
moving from time formats to number formats. HELP.
Thanks
--
DonB


--

Dave Peterson