Excelquestion35
Board Regular
- Joined
- Nov 29, 2021
- Messages
- 53
- Office Version
- 2016
- Platform
- Windows
Hi everyone,
Currently I am dealing with a puzzle regarding box types used for different items.
Based on the item dimensions, I have to decide which box fits best (use the smallest box possible).
I have the following workbook:
with the box sizes stored in a different sheet called Carton Maintenance:
There is luckily no restriction on the way the item is fitted into the box.
Therefore, in the second set of EA dimensions, I sorted the items based on largest to smallest since this sorting comes closest to the respective box size dimensions.
However, what I have now is that the formula will always choose the largest or smallest box size but no box size in between while this possible.
The formula I used in the second row of the last column is:
What would be a better way so that the formula fits the requirements of choosing indeed the optimized box size? For visual reasons I also attached pictures of the Excel sheet below.
Also, I am looking for a way to do the same trick but then to do an assessment of combining items of the same order (column B) into one box if that is possible. Orders can have more than 2 items (in this shared dataset every order only has one item) as well.
Is there a way to do this in an efficient fashion?
Your help is appreciated!
Currently I am dealing with a puzzle regarding box types used for different items.
Based on the item dimensions, I have to decide which box fits best (use the smallest box possible).
I have the following workbook:
SKU | Shopware Auftragsnummer | EA Length | EA Width | EA Height | EA Weight (kg) | Weight check | EA Length | EA Width | EA Height | Box size | ||
606146 | DE10162 | 58 | 39 | 11,5 | 10,13 | OK | 58 | 39 | 11,5 | Carton Type 1 | ||
605640 | DE10185 | 10 | 7,6 | 7,6 | 4,98 | OK | 10 | 7,6 | 7,6 | Carton Type 4 | ||
605840 | DE10345 | 58 | 39 | 11,5 | 10,13 | OK | 58 | 39 | 11,5 | Carton Type 1 | ||
606276 | DE10411 | 19 | 11 | 34 | 9,66 | OK | 34 | 19 | 11 | Carton Type 4 | ||
605596 | DE10503 | 9,9 | 19,7 | 14,4 | 4,76 | OK | 19,7 | 14,4 | 9,9 | Carton Type 4 | ||
605695 | DE10589 | 7,6 | 7,6 | 10 | 5,05 | OK | 10 | 7,6 | 7,6 | Carton Type 4 |
with the box sizes stored in a different sheet called Carton Maintenance:
Description | Carton Code | Length (cm) | Width (cm) | Height (cm) |
Carton Type 1 | T1 | 58 | 39 | 31,5 |
Carton Type 2 | T2 | 58 | 39 | 15 |
Carton Type 3 | T3 | 38,5 | 28 | 15 |
Carton Type 4 | T4 | 38 | 28 | 32 |
There is luckily no restriction on the way the item is fitted into the box.
Therefore, in the second set of EA dimensions, I sorted the items based on largest to smallest since this sorting comes closest to the respective box size dimensions.
However, what I have now is that the formula will always choose the largest or smallest box size but no box size in between while this possible.
The formula I used in the second row of the last column is:
Excel Formula:
=IFERROR(INDEX('Carton Maintenance'!$A$2:$A$5;MOD(SMALL(IF(L2<='Carton Maintenance'!$E$2:$E$5;IF(MAX(J2;K2)<='Carton Maintenance'!$C$2:$C$5;IF(MIN(J2;K2)<='Carton Maintenance'!$D$2:$D$5;'Carton Maintenance'!$C$2:$C$5*'Carton Maintenance'!$D$2:$D$5+(ROW('Carton Maintenance'!$A$2:$A$5)-ROW('Carton Maintenance'!$A$2)+1)/100)));1);1)*100);"No Match")
What would be a better way so that the formula fits the requirements of choosing indeed the optimized box size? For visual reasons I also attached pictures of the Excel sheet below.
Also, I am looking for a way to do the same trick but then to do an assessment of combining items of the same order (column B) into one box if that is possible. Orders can have more than 2 items (in this shared dataset every order only has one item) as well.
Is there a way to do this in an efficient fashion?
Your help is appreciated!