View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
Sandy Mann Sandy Mann is offline
external usenet poster
 
Posts: 2,345
Default Calculating Time

Mike,

With the "Time In" in Cell D3 and the "Time Out" in E3 does:

=IF(COUNT(D3:E3)<2,"",IF(AND(D3<0.5,E30.5),E3-D3-1/24,IF(E3<D3,(17/24-D3)+(E3-6/24),E3-D3)))

do what you want?

--
HTH

Sandy
In Perth, the ancient capital of Scotland
and the crowning place of kings


Replace @mailinator.com with @tiscali.co.uk


"Mike Archer" wrote in message
...
Hello. I want to calculate the time a production unit is in a position.
The
operator should only have to enter "time in" and "time out". The formula
should automatically deduct non-work hours. For example from 6:00 to 8:00
would be 2 hours (very simple). But from 11:00 to 14:00 would be 2 hours
also because there is a lunch from 12:00 to 13:00. From 16:00 to 7:00
should
be 2 hours also because shift ends at 17:00 and begins again at 6:00. I
can't find an example to use for this. Please help if you can!
--
Thanks,
Mike