VBA for inventory allocation (complicated)

michaelr81

New Member
Joined
Apr 25, 2014
Messages
7
Hi all : )
I am looking for a macro to do inventory allocation for me. I want it to automatically take quantities from locations that have excess quantities above minimum, and give it to locations that have 0 or have quantities below minimum. The minimums are defined for each product. I want to take stock from the worst location first, and then the second worst and so on. I also want it to give stock to the best location first, then the second best and so on based on the location ranking which is also defined. The end result would be a summary of movements. I know it's a bit complicated but I hope someone can help me !

In the 1st table we see the missing quantities in orange and in the 2nd table, the green cells have the new allocation, and the red cells have the updated stock after distributing it to the green cells.

1683205200831.png


1683205213291.png
 

Attachments

  • 1683204874969.png
    1683204874969.png
    8.2 KB · Views: 9
  • 1683204885980.png
    1683204885980.png
    8 KB · Views: 7
  • 1683204903890.png
    1683204903890.png
    12.8 KB · Views: 8
  • 1683205177123.png
    1683205177123.png
    16.2 KB · Views: 6

Excel Facts

Convert text numbers to real numbers
Select a column containing text numbers. Press Alt+D E F to quickly convert text to numbers. Faster than "Convert to Number"

Forum statistics

Threads
1,215,143
Messages
6,123,280
Members
449,094
Latest member
GoToLeep

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