Number of Staff during each 30 minute interval

tinferns

Board Regular
Joined
Aug 18, 2009
Messages
150
Office Version
  1. 2019
  2. 2016
Platform
  1. Windows
Hello Team.. another request.. Been thru similar requests threads..none matched my requirement.

Based on the below RAW DATA, I want to know how many staff I have at any given time.

SAMPLE RAW DATA:
EMP IDEmp NameSupervisor14-Oct-1815-Oct-1816-Oct-1817-Oct-1818-Oct-1819-Oct-1820-Oct-18
1070273Thomas MosesMartin FernandesOFFOFFVacation20:3020:3020:3020:30
1071115Allan WalkerRicardo BravoOFFOFF20:3020:3020:3020:3020:30
1069788Allison MoyetRicardo Bravo13:30OFFOFF13:3013:3013:3013:30
1073237Pink FloydMartin FernandesVacation05:30VacationVacationVacationVacationVacation
1072766Phill CollinsAnson Palio13:3013:3013:3013:3013:30OFFOFF
1071247Sam RichardsonRicardo Bravo20:3020:3020:3020:3020:30OFFOFF
1070905Samantha FoxMartin Fernandes20:3020:3020:3020:30OFFOFF20:30
1070272Anifa SequeiraAnson PalioOFF11:3011:3011:3011:3011:30OFF
1067361Poison IvyRicardo BravoVacationVacationVacationVacationVacationVacationVacation
1067150Anthony StallonMartin Fernandes07:3007:30OFF07:3007:3007:30OFF
1073477Joshua FernandezAnson PalioOFFOFF13:3013:3013:3013:3013:30
1067068Jude PatrickRicardo Bravo12:3012:30OFFOFF12:3012:3012:30
1073839Barry HeldtMartin Fernandes18:3018:3018:30OFFOFF18:3018:30
1062698Ben IsaacAnson Palio07:3007:3007:30OFFOFF07:3007:30
1072024Christopher RMartin Fernandes11:3011:3011:3011:3011:30OFFOFF
1064043Clifford DasAnson Palio12:3012:3012:3012:30VacationOFFOFF
1073989Morten HarketRicardo Bravo16:3016:3016:3016:3016:30OFFOFF
1073533Delphinia DkharAnson Palio16:3016:3016:30OFFOFF16:3016:30
1067367Cheryl RodriguesMartin Fernandes09:3009:3009:3009:30VacationOFFOFF

<colgroup><col><col><col><col span="7"></colgroup><tbody>
</tbody>


I have 90 such entries.

Each person works for 9 hours straight.

I don't bother about breaks.

Below are the shifts we operate:

SHIFT TIMINGS:
Sr. No.Start TimeEnd Time
105:3014:30
207:3016:30
309:3018:30
411:3020:30
512:3021:30
613:3022:30
714:3023:30
816:3001:30
917:3002:30
1018:3003:30
1120:3005:30
1221:3006:30
1322:3007:30

<colgroup><col><col><col></colgroup><tbody>
</tbody>

SUGGESTED OUTPUT: (Could be incorrect.. I did this manually!)
14-Oct-1815-Oct-1816-Oct-1817-Oct-1818-Oct-1819-Oct-1820-Oct-18
05:300
06:000
06:300
07:000
07:302
08:002
08:302
09:002
09:302
10:002
10:302
11:002
11:303
12:003
12:303
13:003
13:305
14:005
14:305
15:005
15:305
16:005
16:305
17:003
17:303
18:003
18:303
19:003
19:303
20:003
20:304
21:004
21:304
22:004
22:304
23:002
23:302
00:002
00:302
01:002
01:302
02:002
02:302
03:002
03:301
04:001
04:301
05:001

<colgroup><col><col><col><col span="5"></colgroup><tbody>
</tbody>

<colgroup><col width="80" span="8" style="width:60pt"> </colgroup><tbody>
</tbody>

I am looking for a formula like Sumproduct. Please avoid VBA :).

Await your reply.

Thanks

martin
 

Excel Facts

What is =ROMAN(40) in Excel?
The Roman numeral for 40 is XL. Bill "MrExcel" Jelen's 40th book was called MrExcel XL.
I put the new table on another sheet. Try:


Book1
ABCDEFGH
114-Oct-1815-Oct-1816-Oct-1817-Oct-1818-Oct-1819-Oct-1820-Oct-18
25:300100000
36:000100000
46:300100000
57:000100000
67:302311121
78:002311121
88:302311121
99:002311121
109:303422121
1110:003422121
1210:303422121
1311:003422121
1411:304644331
1512:004644331
1612:306855442
1713:006855442
1813:308978764
1914:008978764
2014:308878764
2115:008878764
2215:308878764
2316:008878764
2416:308888754
2517:008888754
2617:308888754
2718:008888754
2818:308887765
2919:008887765
3019:308887765
3120:008887765
3220:309899878
3321:009899878
3421:307688767
3522:007688767
3622:305565445
3723:005565445
3823:305565445
390:005565445
400:305565445
411:005565445
421:303344334
432:003344334
442:303344334
453:003344334
463:302234323
474:002234323
484:302234323
495:002234323
Sheet2
Cell Formulas
RangeFormula
B2=COUNTIFS(Sheet1!D$2:D$40,">"&IF($A2<=5/24,$A2+15/24,$A2-9/24),Sheet1!D$2:D$40,"<="&IF($A2<=5/24,$A2+1,$A2))


Copy down and across as needed. Let us know how it works, I got several variances from your example.
 
Upvote 0
Thanks Eric. It seems to be a perfect fit. I believe it is accurate... however will audit the same and get back. Thanks a million.
 
Upvote 0

Forum statistics

Threads
1,214,650
Messages
6,120,736
Members
448,988
Latest member
BB_Unlv

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