INDEX/MATCH for lookup criteria and value between low/high range (like VLOOKUP "TRUE")

megera716

Board Regular
Joined
Jan 3, 2013
Messages
146
Office Version
  1. 365
Platform
  1. Windows
You know how you can VLOOKUP a number in a range and if you do TRUE instead of FALSE it will return the value where the lookup value is between the low and high ends?

So if I only had these columns and did "=VLOOKUP(F2,$B$2:$D$5,3,TRUE), it would return 700 (which is between 8.5 and 8.99).
1727723158152.png


But I have multiple structures. So I need it to return the value in D for lookup value G2:G3 AND F2:F3 within a low/high range. If it weren't for the ranges, I would say =INDEX($D$2:$D$10,MATCH(G2,$A$2:$A$10,0)) which of course only returns $0 because that is the first row with B.
1727723456496.png


Hopefully this makes sense! Thanks!
 

Excel Facts

Highlight Duplicates
Home, Conditional Formatting, Highlight Cells, Duplicate records, OK to add pink formatting to any duplicates in selected range.
dont use 0 in the match
you have
1
or
-1

match_type(Optional) The number specifying the type of match performed:
0 = Exact match, the lookup_array does not have to be sorted
1 (> 0) = Closest match, exact or the next smallest (default)
-1 (< 0) = Closest match, exact or the next largest
 
Upvote 0
dont use 0 in the match
you have
1
or
-1

match_type(Optional) The number specifying the type of match performed:
0 = Exact match, the lookup_array does not have to be sorted
1 (> 0) = Closest match, exact or the next smallest (default)
-1 (< 0) = Closest match, exact or the next largest

I figured I would not use 0 for the whole thing but I do need to use it for the exact match of "B" or "C" but only the closest match for looking up the number in the range and I don't know how to write/incorporate that part :(. I was also trying to avoid writing a gazillion nested IFERRORS like IFERROR(VLOOKUP("B",....),IFERROR(VLOOKUP("C",....),etc. etc. for all the possible values of "Type."
 
Upvote 0
not 100% sure i follow

G will match the Letter
F will lookup 8.6 , which it will find thelower value in column B and also in Column C
So not sure

as you have not shown the full vlookup , I'm not sure what you are trying to do

Note: Images are difficult to see , and also requires that I input all the data myself, which means I may make an error, which is very time consuming, and from my point of view less likely to get a response, if a complicated spreadsheet. Plus we cannot see any of the formulas used.

Therefore -

A SMALL sample spreadsheet, around 10-20 rows, would help a lot here, with all sensitive data removed, and expected results mocked up and manually entered, with a few notes of explanation.

This will possibly enable a quicker and more accurate solution for you.

MrExcel has a tool called “XL2BB” that lets you post samples of your data and will allow us to copy/paste your sample data into our Excel spreadsheets, saving a lot of time.

You can also test to see if it works ok, in the "Test Here" forum.

OR if you cannot get XL2BB to work, or have restrictions on your PC

then put the sample spreadsheet onto a share

I only tend to goto OneDrive, Dropbox or google docs , as I'm never certain of other random share sites and possible virus.
Please make sure you have a representative data sample and also that the data has been desensitised, remember this site is open to anyone with internet access to see - so any sensitive / personal data should be removed

Make sure you set any share or google to share to everyone
 
Upvote 0

Forum statistics

Threads
1,223,884
Messages
6,175,173
Members
452,615
Latest member
bogeys2birdies

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