Matching maximum product dimension to a Product Band

lampshade87

New Member
Joined
Jul 17, 2023
Messages
2
Office Version
  1. 365
Platform
  1. Windows
Hi Good Folks!

I need to assign a Product Band to each of our products in the Product_Data sheet, and each Product Band has maximum dimensions in Product_Bands sheet.
It is complicated because if a product is larger than any of the 3 dimensions in a band, then it must be another band. For example. a product which is 5cm x 5cm x 3cm can't be a Large Letter, because the height is 3cm, so it is infact a Small Packet. I've been trying to get this to work in GPT for hours without success. I would appreciate any advice!
Please find OneDrive link to my example file: Product_Dimension_to_Band_Calculator (1).xlsx

Sheet: Product_Bands
1689597509746.png


Sheet: Product_Data
1689597557425.png
 

Excel Facts

How can you automate Excel?
Press Alt+F11 from Windows Excel to open the Visual Basic for Applications (VBA) editor.
I went out on a whim and pasted my question in to GPT and it worked.

Excel Formula:
=IF(AND(C2<=Product_Bands!$B$2, D2<=Product_Bands!$C$2, E2<=Product_Bands!$D$2), Product_Bands!$A$2,
 IF(AND(C2<=Product_Bands!$B$3, D2<=Product_Bands!$C$3, E2<=Product_Bands!$D$3), Product_Bands!$A$3,
 IF(AND(C2<=Product_Bands!$B$4, D2<=Product_Bands!$C$4, E2<=Product_Bands!$D$4), Product_Bands!$A$4,
 IF(AND(C2<=Product_Bands!$B$5, D2<=Product_Bands!$C$5, E2<=Product_Bands!$D$5), Product_Bands!$A$5,
 IF(AND(C2<=Product_Bands!$B$6, D2<=Product_Bands!$C$6, E2<=Product_Bands!$D$6), Product_Bands!$A$6,
 IF(AND(C2<=Product_Bands!$B$7, D2<=Product_Bands!$C$7, E2<=Product_Bands!$D$7), Product_Bands!$A$7,
 "Product Band not identified"))))))
 
Upvote 0
Hi & welcome to MrExcel.
Another option
Excel Formula:
=TAKE(FILTER(Product_Bands!$A$2:$A$7,(Product_Bands!$B$2:$B$7>=C2)*(Product_Bands!$C$2:$C$7>=D2)*(Product_Bands!$D$2:$D$7>=E2),"No fit"),1)
 
Upvote 0

Forum statistics

Threads
1,215,172
Messages
6,123,428
Members
449,099
Latest member
COOT

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