Lookup using the left portion of target cells

gmittar

Board Regular
Joined
Sep 16, 2013
Messages
62
Hi All,

I'm trying to figure out a formula to lookup using only the left part of the target cell. I could normally easily just add a column to the target, and use LEFT to isolate the characters I need, but in this case, I need to leave the target sheet intact.

Thank you!

EE Number EE Data
1 5 John Jackson
2 7 James Jameson
3 9 Tito McVodka
4 8 Dr. Randy Rose
5 10 John Doe
6 1 Jane Doe
7 2 Jane McDougal
8 4 Finn McFinn
9 3 Kyle McFinn
10 6 Jane Rose
 
If you want to use index/match
=INDEX(E2:F10,MATCH(B3&"*",E2:E10,0),2)

I din't realise you could use wildcards
 
Upvote 0

Excel Facts

Which Excel functions can ignore hidden rows?
The SUBTOTAL and AGGREGATE functions ignore hidden rows. AGGREGATE can also exclude error cells and more.
I don't think so... In C3 just enter and copy down:

=VLOOKUP("*"&B3&"*",E:F,2,0)

Allow me to clarify. I'll want to look up items both to the left and the right of my anchor column. Vlookup only looks up to the right of the anchor column, so index is the better option for me.

Thanks again.
 
Upvote 0
If you want to use index/match
=INDEX(E2:F10,MATCH(B3&"*",E2:E10,0),2)

I din't realise you could use wildcards

Yep, that works too. Any reason this would be better than the array, or vice versa? I think for continuity sake, not using arrays would be helpful as it's easier for people to understand.
 
Upvote 0
Allow me to clarify. I'll want to look up items both to the left and the right of my anchor column. Vlookup only looks up to the right of the anchor column, so index is the better option for me.

Thanks again.

You are not very clear with your specifications...

=LOOKUP(9.99999999999999E+307,SEARCH(B3,$E$2:$E$400),$F$2:$F$400)
 
Upvote 0
Any reason this would be better than the array, or vice versa?
Whilst formulae aren't my strong point, I suspect that on a performance basis the non-array would be better.
 
Upvote 0

Forum statistics

Threads
1,224,828
Messages
6,181,209
Members
453,023
Latest member
alabaz

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