View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
Luke M Luke M is offline
external usenet poster
 
Posts: 2,722
Default Nght shift allowance

Assuming start time is in A2, stop time is in B2, formula is:

=MAX(B2,"18:00")-MAX("18:00",A2)+MIN("6:00",B2)-MIN("6:00",A2)

Note this is fairly basic, and won't work for shifts going from one day to
another. As neither of your examples had that occuring, I'm hoping its a safe
assumption.
--
Best Regards,

Luke M
*Remember to click "yes" if this post helped you!*


"Maresa" wrote:

sorry if this is a duplicate, but I cannot see the question I posted last
night.
I need to calculate night shift allowance between the hours 18:00 and 6:00
the shift might run from 15:00 to 23:00, the allowance is then = 5 hours, or
it might start at 05:00 to 14:00, the answer should then be 1 hour.