Excel question

tcofran

Expert Member
Joined
Jun 17, 2009
Messages
3,562
Reaction score
1,251
Location
Pretoria
Good day ladies and gents,

Quick question, I have an Excel Spreadsheet with a column containing names and surnames (ie John Doe). I would like to remove the surnames, so in other words, everything after the space of the name.

is there a quick way to achieve this ?

Thanks
 
Use text to colums and then delete surnames with a macro.In 2007 text to columns is under DATA
 
Highlight the column, and replace all

' *'

with

''

I.e. replace all space_*s with nothing. Spaces doesn't work well in code form on a forum...
 
=LEFT("John Doe",SEARCH(" ", "John Doe", 1))

See we all basically posted solutions at the same time there, plenty ways to skin a cat.
 
Last edited:
Sorry, if you do not want a space behind the first name, use this
=LEFT(A1,FIND(" ",A1,1)-1)
 
Thanks you @Guillaume, it works like a charm.
thanks for the other suggestions as well.
 
Top
Sign up to the MyBroadband newsletter
X