View Single Post
  #3   Report Post  
Posted to microsoft.public.excel.worksheet.functions
David Biddulph[_2_] David Biddulph[_2_] is offline
external usenet poster
 
Posts: 8,651
Default Check time in cells to see if it goes across lunch

=B2-A2-TIME(0,30,0)*AND(A2<=TIME(12,30,0),B2=TIME(12,0,0 ))
--
David Biddulph

"koob" <koob@koob wrote in message
...
Hi all

Is there a way to check the time in two cells to make sure that it doesn't
count a lunch break. ie

Start time is 8:45 end time is 16:25 so I need to subtract 30 minutes,
however if I run an if statement
and say use 12:30 if the job starts after 12:30 it will still subtract 30
minutes which I don't want.


Also If it ends before 12:00 again no time subtraction.

Thanks all