Nght shift allowance



sorry if this is a duplicate, but I cannot see the question I posted last
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.

Luke M

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


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

JP Ronse

See your post "Calculate a value between 2 times" and the reply of Chip


Calculate a value between 2 times

Chip Pearson

Here is what I posted as a reply yesterday:

You can use the following formulas. Assume that the start time is in
A1 and the end time is in C1.

To calculate the number of hours between start and 6:00:00, use


To calculate the number of hours between 18:00:00 and end time, use


To calculate the number of hours worked between 6:00:00 and 18:00:00,
excluding hours between 18:00 and 6:00:00, use


Chip Pearson
Microsoft Most Valuable Professional
Excel Product Group, 1998 - 2009
Pearson Software Consulting, LLC
(email on web site)


Thanks for the help so far, I did however forgot to mention that shifts might
go from one day to the other eg. starts at 17:00 and ends at 07:00 the next
day where the answer then should be 12 hours, or another scenario where the
shift could start at 05:00 and ends at 23:00 where the answer should be 6


I think I found a way around it. If the shift goes over midnight, I just type
25:00 for 1 o'clock in the morning, it seems to be working fine then.

Thanks again !

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question