Distribute quantity according to order price

pedroalegria

New Member
Joined
Mar 17, 2023
Messages
2
Office Version
  1. 2019
Platform
  1. Windows
I need to distribute quantity by order price, that is, I have a table where I have hundreds of products in the lines and then I have customer orders in the columns (quantity and price for each order).
I've already managed to identify and order the prices from highest to lowest, and now I need to distribute the available stock among the orders, always starting at the highest price.



ProductAvailable
Stock
Total
Quantity
Order_1Order_2Order_3
QuantityPriceQuantityPriceQuantityPrice
A
920​
1077​
100​
3,00 €
432​
1,00 €
545​
4,00 €
B
150​
183​
43​
12,00 €
65​
43,00 €
75​
15,00 €
C
100​
206​
43​
43,00 €
76​
21,00 €
87​
54,00 €
D
200​
652​
243​
87,00 €
111​
43,00 €
298​
21,00 €
What I Need:
ProductAvailable
Stock
Total
Quantity
Order_1Order_2Order_3
QuantityPriceQuantityPriceQuantityPrice
A
920​
1077​
100​
275​
545​
B
150​
183​
10​
65​
75​
C
100​
206​
13​
87​
D
432​
114​
200​
 

Excel Facts

Return population for a City
If you have a list of cities in A2:A100, use Data, Geography. Then =A2.Population and copy down.
Is there any condition that you need to fulfil one Order_1 completely or you can partially fill the order?
 
Upvote 0
Is there any condition that you need to fulfil one Order_1 completely or you can partially fill the order?
Hi Cagau,

I don't have any conditions to fulfill on Orders. I only intend to distribute the available stock based on the price that each customer pays me, that is, from the one who pays me the most (highest price) to the one who pays the least (lowest price) and as long as there is available quantity of product (stock)
 
Upvote 0

Forum statistics

Threads
1,214,651
Messages
6,120,744
Members
448,989
Latest member
mariah3

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