Avatar of cansevin
cansevin

asked on 

Pull last name out of cell

In column A I names. Some are first and last, some are first, middle and last. In Column B I want just the last name. Somehow tell Column be to take out everything up to the space bar on the left of the last name. Any way to make this happen?
Microsoft Excel

Avatar of undefined
Last Comment
barry houdini
Avatar of Alan
Alan
Flag of New Zealand image

Hi,

If the full names are in column A, then paste in this formula to another column and copy down:

=MID(A1,FIND(CHAR(1),SUBSTITUTE(A1," ",CHAR(1),LEN(A1)-LEN(SUBSTITUTE(A1," ",""))))+1,LEN(A1))

I think I got that from someone else, so I should be crediting someone - I apologise for not recalling who!

Alan.

Edit:  Found the source: Jean-François Corbett posting in StackOverflow


<<Link to competing Q&A web site omitted. Name of poster on that site added.--byundt, Microsoft Excel Topic Advisor>>
ASKER CERTIFIED SOLUTION
Avatar of barry houdini
barry houdini
Flag of United Kingdom of Great Britain and Northern Ireland image

Blurred text
THIS SOLUTION IS ONLY AVAILABLE TO MEMBERS.
View this solution by signing up for a free trial.
Members can start a 7-Day free trial and enjoy unlimited access to the platform.
See Pricing Options
Start Free Trial
Microsoft Excel
Microsoft Excel

Microsoft Excel topics include formulas, formatting, VBA macros and user-defined functions, and everything else related to the spreadsheet user interface, including error messages.

144K
Questions
--
Followers
--
Top Experts
Get a personalized solution from industry experts
Ask the experts
Read over 600 more reviews

TRUSTED BY

IBM logoIntel logoMicrosoft logoUbisoft logoSAP logo
Qualcomm logoCitrix Systems logoWorkday logoErnst & Young logo
High performer badgeUsers love us badge
LinkedIn logoFacebook logoX logoInstagram logoTikTok logoYouTube logo