Create a Plan of Duties by time

Pauljj

Well-known Member
Joined
Mar 28, 2004
Messages
2,047
I want to be able to see at a glance the number of people I have in at a specific time on a certain duty. I give the example of how it should appear

Book1
ABCDEFGHIJKLMNOPQRSTUVWXYZ
4Duty1TimetoDuty2TimetoTime07:0007:3008:0008:3009:0009:3010:0010:3011:0011:3012:0012:3013:0013:3014:0014:30
5Employee1Alpha07:0013:00Confs13:0018:00
6Employee2Alpha1111112222222222
7Employee3ClientAdv
8Employee4Confs1111
9Employee5Phone
10Employee6PhoneUrg
11Employee7Problem
12Employee8Quotes
13Employee9Alpha13:0018:00RepFee
14Employee10Urgent
15Employee11
16Employee12
17Employee13
18Employee14Alpha10:0021:00
Sheet2



The user would enter the duty and the time the employee would be doing the duty, I simply need the number of people who are doing the duty to appear in the table from column J onwards, any ideas, my problem are between counting the number of times the duty happens and working out the from and to times ?
 

Excel Facts

How to fill five years of quarters?
Type 1Q-2023 in a cell. Grab the fill handle and drag down or right. After 4Q-2023, Excel will jump to 1Q-2024. Dash can be any character.
Try placing this formula in K6 and then copying to the other cells.

=SUMPRODUCT(--($B$5:$B$18=$J6),--($C$5:$C$18<=K$4),--($D$5:$D$18>=K$4))+SUMPRODUCT(--($F$5:$F$18=$J6),--($G$5:$G$18<=K$4),--($H$5:$H$18>=K$4))<?XML:NAMESPACE PREFIX = K$4),--($D$5 /><K$4),--($D$5:$D$18><?XML:NAMESPACE PREFIX = K$4),--($H$5 /><K$4),--($H$5:$H$18>

This shows 0's where you have blanks. If you want to have blanks then you'll need to adjust the formatting of the cell, I think.

Cheers

Gordon
</K$4),--($H$5:$H$18></K$4),--($D$5:$D$18>
 
Last edited:
Upvote 0
Just to clarify something about this. I've used <= and >= in my formula to compare times and this gives slightly different results to what's in your sample data. It depends on how you want to indicate whether people are available at a particular time. Strictly speaking, at 13:00 you've got 3 Alphas there although one is just finishing. If you want to make so that those that are finishing are not available then use this formula.

=SUMPRODUCT(--($B$5:$B$18=$J6),--($C$5:$C$18<=K$4),--($D$5:$D$18>K$4))+SUMPRODUCT(--($F$5:$F$18=$J6),--($G$5:$G$18<=K$4),--($H$5:$H$18>K$4))<K$4),--($D$5:$D$18><K$4),--($H$5:$H$18>

</K$4),--($H$5:$H$18></K$4),--($D$5:$D$18>
 
Upvote 0

Forum statistics

Threads
1,224,587
Messages
6,179,733
Members
452,939
Latest member
WCrawford

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