Forum Discussion
MHolmes007
Nov 15, 2022Copper Contributor
Divide as Whole Number and Allocate to Monthly Column
I have a sheet with start date, finish date and quantity, then have a formula that divides the quantity over the selected months and enters the result into the appropriate month column. What I am...
- Nov 16, 2022
Yes - see the attached workbook.
PeterBartholomew1
Nov 15, 2022Silver Contributor
I could, but the problem is I am not sure that you are using Excel 365, since the technique of dragging across is a legacy technique rather than anything one would use in a dynamic array solution.
= LET(
months, 1 + DATEDIF(startDate, finishDate, "m"),
interval, (period>=startDate)*(period<=finishDate),
finalPeriod, period=finishDate,
batchQty, QUOTIENT(+qty, months),
balance, MOD(+qty, months),
batchQty*interval + balance*finalPeriod
)
The danger is that, by replying, I put others off who may be better positioned to provide the solution you are looking for.
MHolmes007
Nov 16, 2022Copper Contributor
Hi Peter,
Many thanks for the reply.
Unfortunately, I'm not running Excel 365, just standard Office/Excel 2016.
Many thanks for the reply.
Unfortunately, I'm not running Excel 365, just standard Office/Excel 2016.
- HansVogelaarNov 16, 2022MVP
See the attached demo, with a formula that should work in all versions of Excel.
- MHolmes007Nov 16, 2022Copper ContributorHans Vogelaar,
That is fantastic, thank you.
Is there are way to reverse the increment?
To try and explain ....
In the monthly columns, Instead of 15 + 15 + 15 + 14 + 14 = 73
Can I get 14 + 14 + 15 + 15 + 15 = 73- HansVogelaarNov 16, 2022MVP
Yes - see the attached workbook.