Oct 04 2023 10:26 AM
I want to have running total for a set number of days (lets say 20) where there is a total (lets say 3000) that is divided amongst the 20 days (so 150 a day) but if a certain day exceeds or fails to meet the 150 excel will automatically adjust the remaining days to make up the difference or subtract from the the target of 150 accordingly...
make sense?
Oct 04 2023 01:32 PM
Here's an allocation formula. I've attached a workbook so you can take it for a spin.
=LET(
distributed, amount / target,
exceptions, SUM(FILTER(actual, actual <> distributed, 0)),
re_allocate, (amount - exceptions) / total_days,
IF(actual <> distributed, actual, re_allocate)
)
Oct 04 2023 01:44 PM
that works!!
is there a way to have the new daily need just down to one cell instead of across all the days?
Oct 04 2023 01:54 PM
SolutionYes, then the formula can be simplified a bit:
=LET(
distributed, amount / target,
exceptions, SUM(FILTER(actual, actual <> distributed, 0)),
allocate, (amount - exceptions) / total_days,
allocate
)
Oct 06 2023 02:48 PM
Oct 04 2023 01:54 PM
SolutionYes, then the formula can be simplified a bit:
=LET(
distributed, amount / target,
exceptions, SUM(FILTER(actual, actual <> distributed, 0)),
allocate, (amount - exceptions) / total_days,
allocate
)