Index match not working for grater than value

IrinaI

New Member
Joined
Aug 28, 2020
Messages
2
Office Version
  1. 365
Platform
  1. Windows
Hi there!

I'm trying to make the index match formula work for -1 (greater than values) as I don't have the exact match for the value I'm looking for:
I have an invoice table and a tariff table and based on the value of the weight in the invoice I need it to get the cost.
If I use vlookup (image 1) it returns a value, but from the range less than the kg that I need--> it finds 342€ when it should be 411€ (image 2)
But then Index-match with -1 isn't working either... it returns NA (image 3)
Anyone have an idea of what could be happening?

Thanks!!
1598595347239.png
(1)
1598595537254.png
(2)
1598595290527.png
(3)
 

Excel Facts

Enter current date or time
Ctrl+: enters current time. Ctrl+; enters current date. Use Ctrl+: Ctrl+; Enter for current date & time.
Try something like =INDEX(Tariffs!$A$5:$A$64;match(AE10;tariffs!$D$5:$D$64;1)+1)
(with the MATCH -1 switch lookup values must be sorted descending)
 
Upvote 0
Try something like =INDEX(Tariffs!$A$5:$A$64;match(AE10;tariffs!$D$5:$D$64;1)+1)
Apart from I think the columns might be swapped in that compared to the OP's VLOOKUP, won't that give the wrong answer if the value being looked up exactly matches a value in the lookup table? (see column AG below)

@Irinal
Do you have the XLOOKUP function in your Excel 365 (not everybody does yet)? If so, that function has an option to look for next highest if no exact match.
It would go something like column AF below (with ; as your formula separator of course)

If you do not have XLOOKUP then an amended INDEX/MATCH is suggested in column AH that overcomes the issue I mentioned earlier.

Irinal 1.xlsm
ABCD
4670011
4780012
4895003
49100014
50110005
Tariffs


Irinal 1.xlsm
AEAFAGAH
109486333
119500343
1210200555
Sheet2
Cell Formulas
RangeFormula
AF10:AF12AF10=XLOOKUP(AE10,Tariffs!$A$5:$A$64,Tariffs!$D$5:$D$64,"",1)
AG10:AG12AG10=INDEX(Tariffs!$D$5:$D$64,MATCH(AE10,Tariffs!$A$5:$A$64,1)+1)
AH10:AH12AH10=INDEX(Tariffs!$D$5:$D$64,MATCH(AE10,Tariffs!$A$5:$A$64,1)+(COUNTIF(Tariffs!$A$5:$A$64,AE10)=0))
 
Upvote 0

Forum statistics

Threads
1,214,979
Messages
6,122,561
Members
449,089
Latest member
Motoracer88

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