Splitting Excel fields
Excel is extremely powerful for manipulating data and cleaning up and merging lists. Pretty much every list has the contacts name in a format that is not what you want. Here is one way to put that right. Not meant to be teaching grandma to suck eggs but if it is useful, great.
Splitting one name field into First name and Surname
First, insert two new columns immediately to the right of the column with the full name in and label them "First name" and "Surname"
Place your cursor in the column at the top of the list and type in the formula - =LEFT(A2,FIND(" ",A2)-1) . Change the field references to match your file. This formula finds the blank space between the first and surname - the -1 removes the space from the result putting everything to the left of the space into the new column.
Next place the cursor in the Surname filed and type the following formula - =RIGHT(A2,LEN(A2)-(FIND(" ",A2))) . Again change the field references to match your file. This again finds the blank space and places everything to the right into the surname field.
Copy the two new and Surname fields down your data file so that it calculates the new content for each record. Select the two columns (B and C in the example), copy and Paste Values only into the same columns (accessed through "Paste Special" sub menu on old versions of Excel.
You can substitute other characters for the space such as commas or a text string. You can also nest the formulas into or commands to do two jobs at the same time. For example this formula would find the but ensure it is in Title case in the new field even where the original full name had been type in using only lower case letters.
=PROPER(LEFT(A2,FIND(" ",A2)-1))
Have fun.
More from the Blog...
by Tony (12 Jan 2010)
by Tony (04 Nov 2009)
Websites and Applications I use on a daily basis...
by Adam (28 Oct 2009)
Innovation and Ig Noble Awards
by Tony (02 Oct 2009)
England vs Ukraine ONLINE VIEWING ONLY??
by Adam (14 Sep 2009)
Got a good iPhone App? Read that small print first!..
by Adam (14 Aug 2009)
by Ian Tearle (29 Jul 2009)
by Tony (21 Jul 2009)
What is the future for MySpace?
by Adam (17 Jul 2009)


