Excel Loop?

UserNam3

New Member
Joined
Mar 15, 2018
Messages
1
Hey guys, first post here.

I need a little help.
Basically I have two sheets, Sheet 1 contains the dimensions of parts I have at my warehouse, and the Box Types sheet contains the dimensions of boxes we have available. I think you can see where I am going with this. I'm trying to reference Box Types in sheet 1 to find the most suitable box to ship the part in.

I started with an IF AND formula

Which just checks each dimension and if they are all true, it returns the box size, if not, it moves on to the next line scaling all of the referenced cells by 1.

Now, I want to do this for all lines, but cannot figure out how to do loops or counters in Excel.

=IF(AND(D2<='Box Types'!D2, E2<='Box Types'!E2, F2<='Box Types'!F2),'Box Types'!C2,"N/A")

qESXHSF

Here is the Item Dimensions sheet with the "Box" column using the formula. It only works line by line in both sheets right now. The N/A is just a placeholder for now, but I would like to add a "None Available" output if there are non found on the Box Types list after going through all values.
qESXHSF.png


Here is the Box Dimensions sheet being referenced.
mOZidL4.png




Does anyone have any advice on how to go about doing this? Thanks!
qESXHSF
 

Excel Facts

Can you AutoAverage in Excel?
There is a drop-down next to the AutoSum symbol. Open the drop-down to choose AVERAGE, COUNT, MAX, or MIN

Forum statistics

Threads
1,214,830
Messages
6,121,839
Members
449,051
Latest member
excelquestion515

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