I currently am in need of an excel formula or way to do this simple optimization to sort items by popularity.
Context:
The image is a top-down view of course, each square is a product we sell, and the color represents popularity and the two columns is because it's an alley. The popular items have to be at the top because they are the closest to the packaging machine which makes it significantly faster to move if it's closer while non-popular items that don't get shipped too often should be further away. The popularity varies throughout each day too.
Currently I print out the (left side of the image) and sort and move each item manually to the top, but it's a tedious process because it's a rather busy warehouse so it takes time to move, so I only move the most popular two products to the top.
Problem:
So I want to make an excel sheet that tells me to move item [RED] from C1 to A1, and D2 to A2, for [ORANGE] from F1 to B1, and F2 to B2 and so on... I have a column A for product code (basically the colors), B for location (like A1, A2, ..., in the image), C for popularity (The color, aka how much is expected to be sold today), and D for stock balance (Not necessary, but could be added for context)-
My current solution is to copy the columns article, location and popularity, then sort by popularity using AZ sort-thing in Excel which gives the order I'm looking for, but then I have to manually write Move To, and also the new sorted copy has to say "Move from" cause it shows the most popular item's location, but I want to move that popular item TO the first location. And also the warehouse is huge with > 500 products so doing it all manually and accounting for every alley is very tedious.
I might be explaining the problem bad but please bear with me.
Here is a sample of redacted data:
NOTE: The image is not to scale and the colors are supposed to take up same amount of space, so ignore that and assume they are just equal sized cells.




