Formula based on ranking and available capacity

Walt016

New Member
Joined
Apr 3, 2019
Messages
1
I have a problem where I am trying to produce a certain number of units, however the available capacity does not allow all of the units to be produced each month and they need to be produced in order of their ranking from 1 through 6.

The ranking of the units to be produced changes from month to month. Example below:
Month 1 Total capacity - 150 units


Units able to be produced:
Site1 Product1 - 25 units
Site1 Product2 - 30 units
Site1 Product3 - 65 units
Site2 Product1 - 20 units
Site2 Product2 - 15 units
Site2 Product3 - 20 units


Unit product price:
Site1 Product1 Price - $7.13
Site1 Product2 Price - $4.28
Site1 Product3 Price - $2.67
Site2 Product1 Price - $4.30
Site2 Product2 Price - $2.11
Site2 Product3 Price - $1.09


Ranking based on product price:
Site1 Product1 - 1
Site1 Product2 - 3
Site1 Product3 - 4
Site2 Product1 - 2
Site2 Product2 - 5
Site2 Product3 - 6


Expected result:
Site1 Product1 - 25 units produced
Site1 Product2 - 30 units produced
Site1 Product3 - 65 units produced
Site2 Product1 - 20 units produced
Site2 Product2 - 10 units produced (plant capacity reached, only 10 of 15 units able to be produced)
Site2 Product3 - 0 units produced (plant capacity reached, 0 o 20 units able to be produced)


The above expected result section is where I am struggling to find a formula that will work.
 

Excel Facts

How can you turn a range sideways?
Copy the range. Select a blank cell. Right-click, Paste Special, then choose Transpose.

Forum statistics

Threads
1,224,823
Messages
6,181,181
Members
453,022
Latest member
Mohamed Magdi Tawfiq Emam

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