Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Westi on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Macro: Split Name cells around spaces

Status
Not open for further replies.

mossbs

Programmer
Aug 19, 2008
102
GB
Hi All,

First off - Macros in Excel are certainly is not a strong point of mine, so bare with me!

Right i have an excel s/s with 2 columns....
name and email address

What i need to do is split the name column into 3 columns as it contains 3 sets of data...

Title: Mr
FirstName: Jim
LastName: Morrison

So at present the name column looks like 'Mr Jim Morrison'

Is there any way to split this column into 3 using the 'space' as the delimiter?

Cheers for any help.

Dan.
 



Hi,

I'm keeping everything in place on my person, thank you.

Insert 2 or 3 columns BETWEEN your two columns.

Select the NAME column so you can parse, using the space delimiter.

Data > Text to columns -- DELIMITED: Select SPACE --FINISH

Skip,
[glasses]Don't let the Diatribe...
talk you to death![tongue]

[glasses]Just traded in my old subtlety...
for a NUANCE![tongue]
 
hmmmmmm...twas somewhat simpler than i imagined eh!?!
d'oh!

awesome though cheers for the help dude!
 
Just be careful that you do have the 3 pieces of data for each record though - normally with this kind of thing, the trickiness comes in having to deal with lack of Mr / Mrs or a middle name or a double barrel surname - all of these things can throw text to columns out of whack.

If you've got nice neat data however, then definitely the best way for a one off job

Rgds, Geoff

We could learn a lot from crayons. Some are sharp, some are pretty and some are dull. Some have weird names and all are different colours but they all live in the same box.

Please read FAQ222-2244 before you ask a question
 



Ahhhh, the voice of experience!

Take heed of Goeff's sage advise, not to mention parsley, rosemary & thyme.

Skip,
[glasses]Don't let the Diatribe...
talk you to death![tongue]

[glasses]Just traded in my old subtlety...
for a NUANCE![tongue]
 
i'm more of a basil man myself... but still sound advice!

cheers all!
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top