View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
Ron Rosenfeld Ron Rosenfeld is offline
external usenet poster
 
Posts: 5,651
Default Check time in cells to see if it goes across lunch

On Sat, 09 Feb 2008 10:52:10 -0600, koob <koob@koob wrote:

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



=End-Start-TIME(,30,)*AND(Start<TIME(12,,),EndTIME(12,30,))


--ron