# I need a formula to help in the distribution of the quantities by months according forecast sales and When the quantities of batch ends jumping to the quantities from the next batch to make up

Dear ,

I hope you are doing great

I have a small problem I hope to find a solution for the purpose of facilitating the work, I have two product A&B and there quantities available  for sales in the store , the quantities categorized according batch no .

As well,  I have information about what are the expected quantities of sales on monthly basis  of each product.

Now I need a formula to help in the distribution of the quantities  by months according  forecast sales and  When the quantities of  batch  ends  jumping  to the quantities from the next batch  to make up the shortfall.

For more clarification i have enclosed my exercise , Please see the attached

Thanks
my-exercise.xlsx
Microsoft ExcelSales

Last Comment
Satech Jubara

8/22/2022 - Mon
Satech Jubara

Dear ,

I am still waiting you response .

Ryan Chong

I try to come out with something to handle all the conditions but it may still need to touch up a bit.

as a start, you probably can refer to attached and amend accordingly.

hope this give you some idea how to do it.
my-exercise_b.xlsx
Satech Jubara

Dear Ryan Chongو

Thank you for your interest and help, Unfortunately not solved properly ,It will seem to you if you change the qty available for product A batch no K120 , if you change the qty to be 3,000 Instead 5,000 you will notice that the distribution for product A batch no K121 not correct ,All quantitative"4000" putted  in the month of February 2016.

Try and tell me if there is an update

Thanks , once again
Satech Jubara

It seems that this scenario has no ideal solution, since I have  no replies
Ejgil Hedegaard

Try attached.
Column D, row 11 and row 18 are hidden with no values, to be able to make a single formula to copy to all cells.
my-exercise-1.xlsx
Satech Jubara

Dear Ejgil Hedegaard,

Thanks lot for your response , the formula that  used not help , you will discover that if you change the qty  for product A batch no K120 to be 1,000TINS

Thanks
Ejgil Hedegaard

I did not expect the batch qty to be lower than the monthly qty, so the initial value used the monthly, not the available batch.
Another adjustment made to handle that all batch qty can be below monthly qty.
Here is a revised version.
my-exercise-1.xlsx
Satech Jubara

Dear Ejgil Hedegaardو

Thank you it's actually been solved

Thank you sir
Satech Jubara