Looking up a value to see if it is valid in multiple ranges

plwhittington

Board Regular
Joined
May 10, 2007
Messages
132
I have a list of numeric values in Column F to look up. I am trying to see if the value in each row of column F is valid in ranges in columns J-K and if so, return the value in column L for that row into column G. If the value is not found in any of the ranges in columns J-K, return an error or "Not Found" in Column G.

I have tried VLOOKUPs and COUNTIFs, but cannot seem to get what I need.

Can anyone tell me what formula I could use in Column G?
Thx.
 

Excel Facts

Do you hate GETPIVOTDATA?
Prevent GETPIVOTDATA. Select inside a PivotTable. In the Analyze tab of the ribbon, open the dropown next to Options and turn it off
Something like
=IFERROR(VLOOKUP(F5,J1:L30,3,0),IFERROR(VLOOKUP(F5,K1:L30,1,0),"Not found"))
 
Upvote 0
Thanks, but did not work. For example, one value I'm looking up in Col F is 61. The range in Col J-K is 51-71 (Col J=51, Col K=71) so the formula is not finding it.

Also, I need it to be able to identify values that are not in any of the ranges, so if I add "false" to the VLOOKUP, it will assign a value even if it is not in a valid range.
 
Last edited:
Upvote 0
Tried, but my network security won't let me navigate to these pages to download a tool that let me post a screenshot. Below is sample data if that helps.

Col F, G, J, K, L
75, Henry, 1, 10, Adam
61, Graham, 15, 22, Bill
11, Not Found, 29, 40, Catherine
27, Not Found, 44, 50, Diane
51, 55, Ed
61, 65, Graham
68, 77, Henry

The only formula I have in in Column G, which doesn't work, but the values I would expect to see are shown above.
Thanks again for any help you can give.
 
Upvote 0
Ok, how about


Excel 2013/2016
FGHIJKL
2Col FGJKL
375Henry110Adam
461Graham1522Bill
511Not found2940Catherine
627Not found4450Diane
75155Ed
86165Graham
96877Henry
List
Cell Formulas
RangeFormula
G3{=IFERROR(INDEX($L$3:$L$9,MATCH(1,($J$3:$J$9<=F3)*($K$3:$K$9>=F3),0)),"Not found")}
Press CTRL+SHIFT+ENTER to enter array formulas.
 
Upvote 0
You're welcome & thanks for the feedback
 
Upvote 0

Forum statistics

Threads
1,223,893
Messages
6,175,241
Members
452,622
Latest member
Laura_PinksBTHFT

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