Price lookup based on width x drop values

Ketreikan

New Member
Joined
Mar 14, 2012
Messages
3
HI All, wondering if I can get some help?
I'm trying to create a excel sheet which will automatically return a price based on a given width and drop value. Currently, I calculate the price manually by looking in a price book which has plenty of rows and columns and prices. I want to simplify this by simply entering the dimensions so it automatically calculates price based on the dimensions entered.
Below is the start of my worksheet. If I choose the exact sizes shown on the table, it will return a price, however if I choose a size that is not listed, I get an #N/A. Eg. If I choose 780 x 1500, it will return the price $179, but if I choose for instance 775 x 1490, it only returns #N/A, when I want it to still return the price $179.
My formula in K3 is
=IF(AND($I$3>0,$J$3>0),INDEX($A$3:$F$8,MATCh(J3,$A$3:$A$8,0),MATCH(I3,$A$3:$F$3,0)))

Can anyone help?
Thanks.
Excel Workbook
ABCDEFGHIJK
1
2ItemWidthHeightPrice
3mm6307809301080123019751821#N/A
49001581681791891992
512001621741851952083
61500166179191203216
71800170185197210222
82100174189203216231
92400179193208224239
102700185201218233249
11
Sheet1
Excel 2010
Cell Formulas
RangeFormula
K3=IF(AND($I$3>0,$J$3>0),INDEX($A$3:$F$8,MATCH(J3,$A$3:$A$8,0),MATCH(I3,$A$3:$F$3,0)))
 

Excel Facts

What is the last column in Excel?
Excel columns run from A to Z, AA to AZ, AAA to XFD. The last column is XFD.
If you change your formula to this, it will match the closest values less than or euqal to the lookup values.

=IF(AND($I$3>0,$J$3>0),INDEX($A$3:$F$8,MATCH(J3,$A$3:$A$8,1),MATCH(I3,$A$3:$F$3,1)))

You would have to change the cutoff limits in the table as below.

<br />
Book1
ABCDEFGHIJK
2ItemWidthHeightPrice
3mm06317819311081123117751490179
401581681791891992
59011621741851952083
61201166179191203216
71501170185197210222
81801174189203216231
92101179193208224239
102401185201218233249
112701
Sheet1
Cell Formulas
RangeFormula
K3=IF(AND($I$3>0,$J$3>0),INDEX($A$3:$F$8,MATCH(J3,$A$3:$A$8,1),MATCH(I3,$A$3:$F$3,1)))


Alternatively, you could keep the table limits as before but the formula adds 1 to the Width and Height lookup values.
 
Last edited:
Upvote 0
Alpha Frog, Thank you so much for your help... It worked perfectly.
I have one other query...
I am copying the formula down to cells L4 & L5 etc...
When I have no value in the width and drop cells, I still get a min price of $158 in the L cells... Is there any way to have these as 0, or blank until I put sizing in?

Thanks so much for your help.

Regards

Ket.
 
Upvote 0
You're welcome.

I have one other query...
I am copying the formula down to cells L4 & L5 etc...
When I have no value in the width and drop cells, I still get a min price of $158 in the L cells... Is there any way to have these as 0, or blank until I put sizing in?

The IF(AND($I$3>0,$J$3>0)... should prevent that if you remove the absolute $'s. You may want to add a null string ("") for the FALSE result of the IF as below.

=IF(AND(I3>0,J3>0),INDEX($A$3:$F$8,MATCH(J3,$A$3:$A$8,1),MATCH(I3,$A$3:$F$3,1)),"")
 
Upvote 0

Forum statistics

Threads
1,215,446
Messages
6,124,896
Members
449,194
Latest member
JayEggleton

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