Hi guys,
I am looking for ideas from the wealth of knowledge within the forum
- I will try to explain as best I can but I apologise in advance if I haven't explained it well.
So, I have a worksheet with three columns (there can be more if needed) the first column shows the time period, split into 15 minute interval segments going top to bottom. The middle column is currently blank with the total amount of hours that need to be allocated at the bottom (in this case 12.5 hours), the third column shows me how many people I have available during each interval.
I need a formula, function or even VBA in the second column that will look at the number of people I have available within the third column (both at row and total level) and distribute how many people I will allocate at each time interval in a weighted fashion so that the sum of all the intervals in the second column (divided by 4 to convert it into hours) matches the number of hours required at the bottom. So for example I want the number of people allocated at 00:00 to be higher than it is at 01:00 and If possible I only want it to allocate agents if the staffing is over 5.
[TABLE="class: grid, width: 500, align: center"]
<tbody>[TR]
[TD]Time
[/TD]
[TD]Allocated
[/TD]
[TD]Available
[/TD]
[/TR]
[TR]
[TD]00:00
[/TD]
[TD][/TD]
[TD]25
[/TD]
[/TR]
[TR]
[TD]00:15
[/TD]
[TD][/TD]
[TD]24
[/TD]
[/TR]
[TR]
[TD]00:30
[/TD]
[TD][/TD]
[TD]24
[/TD]
[/TR]
[TR]
[TD]00:45
[/TD]
[TD][/TD]
[TD]22
[/TD]
[/TR]
[TR]
[TD]01:00
[/TD]
[TD][/TD]
[TD]7
[/TD]
[/TR]
[TR]
[TD]01:15
[/TD]
[TD][/TD]
[TD]7
[/TD]
[/TR]
[TR]
[TD]01:30
[/TD]
[TD][/TD]
[TD]7
[/TD]
[/TR]
[TR]
[TD]01:45
[/TD]
[TD][/TD]
[TD]12
[/TD]
[/TR]
[TR]
[TD]02:00
[/TD]
[TD][/TD]
[TD]12
[/TD]
[/TR]
[TR]
[TD]02:15
[/TD]
[TD][/TD]
[TD]12
[/TD]
[/TR]
[TR]
[TD]02:30
[/TD]
[TD][/TD]
[TD]12
[/TD]
[/TR]
[TR]
[TD]02:45
[/TD]
[TD][/TD]
[TD]-2
[/TD]
[/TR]
[TR]
[TD]03:00
[/TD]
[TD][/TD]
[TD]-2
[/TD]
[/TR]
[TR]
[TD]03:15
[/TD]
[TD][/TD]
[TD]-1
[/TD]
[/TR]
[TR]
[TD]03:30
[/TD]
[TD][/TD]
[TD]-1
[/TD]
[/TR]
[TR]
[TD]03:45
[/TD]
[TD][/TD]
[TD]7
[/TD]
[/TR]
[TR]
[TD]04:00
[/TD]
[TD][/TD]
[TD]7
[/TD]
[/TR]
[TR]
[TD]04:15
[/TD]
[TD][/TD]
[TD]7
[/TD]
[/TR]
[TR]
[TD]Required
[/TD]
[TD]12.5 (hours)
[/TD]
[TD]46.25 hours available
[/TD]
[/TR]
</tbody>[/TABLE]
[TABLE="class: grid, width: 500, align: center"]
<tbody>[TR]
[/TR]
[TR]
[/TR]
[TR]
[/TR]
[TR]
[/TR]
[TR]
[/TR]
[TR]
[/TR]
[TR]
[/TR]
[TR]
[/TR]
[TR]
[/TR]
[TR]
[/TR]
[TR]
[/TR]
[TR]
[/TR]
[TR]
[/TR]
[TR]
[/TR]
[TR]
[/TR]
[TR]
[/TR]
[TR]
[/TR]
[TR]
[/TR]
[TR]
[/TR]
[TR]
[/TR]
[TR]
[/TR]
[TR]
[/TR]
[TR]
[/TR]
[TR]
[/TR]
[TR]
[/TR]
[TR]
[/TR]
[TR]
[/TR]
[TR]
[/TR]
[TR]
[/TR]
[TR]
[/TR]
[TR]
[/TR]
[TR]
[/TR]
[TR]
[/TR]
[TR]
[/TR]
[TR]
[/TR]
[TR]
[/TR]
[TR]
[/TR]
[TR]
[/TR]
[TR]
[/TR]
[TR]
[/TR]
</tbody>[/TABLE]
I am looking for ideas from the wealth of knowledge within the forum
So, I have a worksheet with three columns (there can be more if needed) the first column shows the time period, split into 15 minute interval segments going top to bottom. The middle column is currently blank with the total amount of hours that need to be allocated at the bottom (in this case 12.5 hours), the third column shows me how many people I have available during each interval.
I need a formula, function or even VBA in the second column that will look at the number of people I have available within the third column (both at row and total level) and distribute how many people I will allocate at each time interval in a weighted fashion so that the sum of all the intervals in the second column (divided by 4 to convert it into hours) matches the number of hours required at the bottom. So for example I want the number of people allocated at 00:00 to be higher than it is at 01:00 and If possible I only want it to allocate agents if the staffing is over 5.
[TABLE="class: grid, width: 500, align: center"]
<tbody>[TR]
[TD]Time
[/TD]
[TD]Allocated
[/TD]
[TD]Available
[/TD]
[/TR]
[TR]
[TD]00:00
[/TD]
[TD][/TD]
[TD]25
[/TD]
[/TR]
[TR]
[TD]00:15
[/TD]
[TD][/TD]
[TD]24
[/TD]
[/TR]
[TR]
[TD]00:30
[/TD]
[TD][/TD]
[TD]24
[/TD]
[/TR]
[TR]
[TD]00:45
[/TD]
[TD][/TD]
[TD]22
[/TD]
[/TR]
[TR]
[TD]01:00
[/TD]
[TD][/TD]
[TD]7
[/TD]
[/TR]
[TR]
[TD]01:15
[/TD]
[TD][/TD]
[TD]7
[/TD]
[/TR]
[TR]
[TD]01:30
[/TD]
[TD][/TD]
[TD]7
[/TD]
[/TR]
[TR]
[TD]01:45
[/TD]
[TD][/TD]
[TD]12
[/TD]
[/TR]
[TR]
[TD]02:00
[/TD]
[TD][/TD]
[TD]12
[/TD]
[/TR]
[TR]
[TD]02:15
[/TD]
[TD][/TD]
[TD]12
[/TD]
[/TR]
[TR]
[TD]02:30
[/TD]
[TD][/TD]
[TD]12
[/TD]
[/TR]
[TR]
[TD]02:45
[/TD]
[TD][/TD]
[TD]-2
[/TD]
[/TR]
[TR]
[TD]03:00
[/TD]
[TD][/TD]
[TD]-2
[/TD]
[/TR]
[TR]
[TD]03:15
[/TD]
[TD][/TD]
[TD]-1
[/TD]
[/TR]
[TR]
[TD]03:30
[/TD]
[TD][/TD]
[TD]-1
[/TD]
[/TR]
[TR]
[TD]03:45
[/TD]
[TD][/TD]
[TD]7
[/TD]
[/TR]
[TR]
[TD]04:00
[/TD]
[TD][/TD]
[TD]7
[/TD]
[/TR]
[TR]
[TD]04:15
[/TD]
[TD][/TD]
[TD]7
[/TD]
[/TR]
[TR]
[TD]Required
[/TD]
[TD]12.5 (hours)
[/TD]
[TD]46.25 hours available
[/TD]
[/TR]
</tbody>[/T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