How to distribute a variable sum over cells with different starting values

Berry Helmich

New Member
Joined
Mar 26, 2024
Messages
1
Office Version
  1. 365
Platform
  1. Windows
Hi all,

Say I have 5 employees, that start at different times, for example...

13:30
13:30
13:45
14:00
14:00

...and I have a workload of a variable amount of hours. How could I use Excel to calculate when they will finish?

In this example, a workload of 5 hours would mean they should be finished at 14:45

13:30 > 14:45 = 1,25 hrs
13:30 > 14:45 = 1,25 hrs
13:45 > 14:45 = 1 hr
14:00 > 14:45 = 0,75 hr
14:00 > 14:45 = 0,75 hr
Which totals to 5 hrs

I'd like to be able to automate this, so that Excel calculates the time at which they finish, but I'm having some trouble with the fact that the starting times vary.
Does anyone know how I could set up a formula for this? Thanks in advance!
 

Excel Facts

How can you automate Excel?
Press Alt+F11 from Windows Excel to open the Visual Basic for Applications (VBA) editor.
If nobody starts too late to be involved (see the right columns on the picture with last person workon for no time - the last possible value for formula to work properly), and assuming the starting hours are in B2:B6 and the required total of 5:00 is in C2 then in D2 write formula:
Excel Formula:
=(C2-SUM(MAX(B2:B6)-B2:B6))/COUNT(B2:B6)+MAX(B2:B6)
 

Attachments

  • Zrzut ekranu 2024-03-26 233715.png
    Zrzut ekranu 2024-03-26 233715.png
    18.6 KB · Views: 4
Upvote 0

Forum statistics

Threads
1,215,111
Messages
6,123,155
Members
449,098
Latest member
Doanvanhieu

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