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
 

Excel Facts

Save Often
If you start asking yourself if now is a good time to save your Excel workbook, the answer is Yes
i'm not clear on your desire, =LEFT(cell,4) would return the first four characters and build that into your search ?
 
Upvote 0
Thanks for the responses, I've attached a sample file that should illustrate what I'm trying to do. I'm trying to use the numbers in column B (Acc #) to lookup the value in column F(Ranking) by using column E (Account Full).

My normal way to do this would be just to add a column, and use =left(e3,6) and use that as simple vlookup anchor. In this case, I don't want to add a column to the data and i'd like to do it formulaically if possible.

Thank you!

File here
https://sagehospitalityllc.box.com/s/qy2kqp51p51veag42lljfmfg22gztdvr
 
Upvote 0
How about

Excel 2013/2016
BCDEF
2Acc #RankAccount FullRanking
3330100703330100 SOUTHPARK INCOME 703
4332000996332000 TRUST BANK INTEREST 996
533220021332200 MASTER LEASE INCOME 21
6332500726332500 CAM INCOME 726
7332600419332600 PARTNER LOAN INTEREST 419
833270067332700 SOUTHPARK REFI INTEREST 67
9332900433332900 COLEWOOD CENTRE INTEREST 433
1033220021332200 FLORIDA PROCEEDS INTEREST 5
Index
Cell Formulas
RangeFormula
C3{=INDEX(E$3:F$10,MATCH(B3,LEFT(E$3:E$10,6)*1,0),2)}
Press CTRL+SHIFT+ENTER to enter array formulas.


Note that you have 2 accounts that begin with the same number, so only the first is found
 
Upvote 0
Ah yes, the good old array. Something that I'm still getting used to.

Thanks so much Fluff, this worked! The number duplicate was due to changed number, but I'll keep in mind that it will only find the first.

I appreciate the help!
 
Upvote 0
Glad we could help & thanks for the feedback
 
Upvote 0
In B2 enter and copy down:

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

Thanks for your response. I need to be able to look up both left and right, so an index is going to be the better option for me. I'm using Fluff's suggestion, it's working well.

Cheers.
 
Upvote 0

Forum statistics

Threads
1,215,076
Messages
6,122,988
Members
449,093
Latest member
Mr Hughes

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