How to calculate the number of people working different shifts at one time

jonharp165

New Member
Joined
Jun 29, 2015
Messages
14
Office Version
  1. 2016
Platform
  1. Windows
Hi,
We are trying to set up a new shift system at work which will mean different people working different overlapping hours.

I am struggling to find a formula that works. Can you help please?

I have a range of times at 30 min intervals. I want the formula to look up if there is a shift(s) at that time and if so the number of people working. And to then add them to give a total number.

I am fiddling with:
=IF($H$8="y",IF(AND(L$7>=$E$8,L$7<$F$8),$B$8))+IF($H$9="y",IF(AND(L$7>=$E$9,L$7<$F$9),$B$9))

Where:

H determines if a shift is running weekday/Saturday/ Sunday
L determines the point in time
E is the start time of the shift(s)
F s the finish time of the shift (s)
B is the number working that shift pattern

The problem as far as I can work out is that the way excel interprets time in L, E and F are different and determines answers are true even if false.

Any thoughts welcome - Thank you in advance
 

Excel Facts

Can you AutoAverage in Excel?
There is a drop-down next to the AutoSum symbol. Open the drop-down to choose AVERAGE, COUNT, MAX, or MIN
Think I know why! If the time in E is say 16:00 when you add 8:00 & 0:30 then it become 1day & 30mins

Try amending your formula to
=mod(E+(C+D),1)
 
Upvote 0
Think I know why! If the time in E is say 16:00 when you add 8:00 & 0:30 then it become 1day & 30mins

Try amending your formula to
=mod(E+(C+D),1)

You will probably call me an idiot but one of the values for D had a date I it but not the rest. Having changed it it now works.

I have tried the mod and it still returns a correct answer so it must also work.

Thanks for all your help. I think I should be OK from here.
Jonathan
 
Upvote 0

Forum statistics

Threads
1,214,978
Messages
6,122,545
Members
449,089
Latest member
davidcom

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top