Formula Vlookup, Find, and Left

ANE0709

Board Regular
Joined
Feb 2, 2022
Messages
65
Office Version
  1. 365
Platform
  1. Windows
i am trying to piece together a formula that does a vlookup and returns only the last name. ive gotten close but no dice. Can someone help?

what i have so far: Sheet "Form" G4=LEFT(VLOOKUP(D5,'Pathway Raw Data'!B:I,8,0),4) returns "VAN " and needs to return "Van Meter"

I need to change the 4 to return everything to the left of the comma. Ive tried a few different combos but cant seem to figure it out. Maybe there is a different way of going about this altogether?


1651156102481.png
1651156112333.png
 

Excel Facts

What is =ROMAN(40) in Excel?
The Roman numeral for 40 is XL. Bill "MrExcel" Jelen's 40th book was called MrExcel XL.
This will work in all versions
Excel Formula:
=LEFT(VLOOKUP(D5,'Pathway Raw Data'!B:I,8,0),FIND(",",VLOOKUP(D5,'Pathway Raw Data'!B:I,8,0))-1)
Since you have 365 you can also do this, which is a little more readable:
Excel Formula:
=LET(FullName, VLOOKUP(D5,'Pathway Raw Data'!B:I,8,0), LEFT(FullName,FIND(",",FullName)-1))
 
Upvote 0
Solution
Try this formula:
Excel Formula:
=LET(fname,VLOOKUP(D5,'Pathway Raw Data'!B:I,8,0),LEFT(fname,FIND(",",fname)-1))

EDIT: Wow, that is funny, my formula is almost exactly the same as Jeff's!
I haven't used the LET function much, so it took me some time to research it and come up with the formula, and in the meantime Jeff posted it!
(Really, I wasn't copying you Jeff!)
 
Last edited:
Upvote 0
Thanks guys! the =left(vlookup(),find(vlookup())) jeff suggested was one of the combo's i had attempted but didnt work. I know see my error and jeff's suggestion worked like a charm!
 
Upvote 0

Forum statistics

Threads
1,215,648
Messages
6,126,007
Members
449,280
Latest member
Miahr

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