Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save komiga/18adc239244959d8abf3bd15323206ab to your computer and use it in GitHub Desktop.
Save komiga/18adc239244959d8abf3bd15323206ab to your computer and use it in GitHub Desktop.
Excel/Google Sheets: Proportional distribution of unassigned workload to personnel based on their weekly availability (that is, ensures booked workload is distributed fairly and that the final assigned workload adds up exactly to the booked workload).
=arrayformula(
trunc(WorkEng * (AvailEngRange / AvailEng))
+ sort(
arrayformula(if(
row(offset(Z:Z, 0,0, rows(PersonnelNameRange),1))
<= (WorkEng - sum(trunc(WorkEng * (AvailEngRange / AvailEng))))
, 1, 0)),
sort(
arrayformula(
row(offset(Z:Z, 0,0, rows(PersonnelNameRange),1))
),
mod(WorkEng * (AvailEngRange / AvailEng), 1)
, false)
, true)
)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment