Vlookup multiple criteria aproximate value

forzasec

New Member
Joined
Nov 27, 2020
Messages
2
Office Version
  1. 2016
Platform
  1. Windows
Hello,

I have been checking the forum and I haven'found a solution to this question.

I cut cardboards to the client requests and I have to calculate a price. Here is the example:

Cardboards (cm)
40x30 -> 3,5€
40x40 -> 4€
60x40 -> 5€
60x60 -> 5,5€

the client can request a 57x15 cardboard, so the price is 5€ because I have to sell the 60x40 cardboard. If they ask to me a 57x57 cardboard, I have to sell the 60x60 cardboard that is 5,5€.

I can not construct a formula to obtain the price, even with vlookup, match, index, and so on. Is there a formula to be applied or I have to create a macro?

Thanks in advance.
 

Excel Facts

Excel Wisdom
Using a mouse in Excel is the work equivalent of wearing a lanyard when you first get to college
Hi Forzasec,

Does this do what you want?

Forzasec.xlsx
CDEFGHIJ
1Customer RequestResultCardboard (cm)
2XY€ 5.50 XYPrice
342414030€ 3.50
44040€ 4.00
56040€ 5.00
66060€ 5.50
Sheet1
Cell Formulas
RangeFormula
F2F2=IFERROR(INDEX($J$3:$J$6,AGGREGATE(15,6,ROW($H$3:$H$6)-ROW($H$2)/(($H$3:$H$6>=$C$3)*($I$3:$I$6>=$D$3)),1)),"Too big")
 
Upvote 0
Thank you, very professional.
I have also solved transforming my price table to a matrix in order to use the formulas "index" and "match".



But your solution is better because is more natural to me the price list as the one you have used.

Thank you again.
 

Attachments

  • price.png
    price.png
    5.6 KB · Views: 3
Upvote 0

Forum statistics

Threads
1,214,907
Messages
6,122,183
Members
449,071
Latest member
cdnMech

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