I am required to nest certain lengths of items together to get the smallest physical length I can to keep length required as small as possible and eliminate waste. In the attached file you will see that items are catagorized by column F and then sorted shortest to longest using column N. As in the example of Rows 2 thru 6, I thought the best way for me to figure on the shortest length of beam required would be to take 3 times the longest post length (cell N60) and 3 times the shortest post length (cell N2) and add them together. (For reference, each BEAM will produce six POSTS in this particular situation). This returned a value of 26.01 ft which I rounded up to 26' 4" (all order lengths of beams need to be rounded up to the nearest 4" increment). I then add a determined amount of allowable scrap to the final length to determine what the optimal purchasing length would be. I "thought" this would work fine, however, when I started to nest the three longest with the three shortest posts and so forth, as I approached the middle of the pack, the total length of all six posts was starting to exceed the purchased length of the beams.
Is there a macro that could be writen where I could highlight a specific cell range, run the macro which would promt me for the number of posts per beam, the macro would then automatically group the rows together so as to keep the scrap value as low as possible? Then, maybe highlight every other grouping so as to make the grouping be more visible? I tried using the average, the mean, etc. but couldn't find anything that worked.
Any help would be greatly appreciated.
CheddarThief
Bookmarks