Public Schedule Face-to-Face & Online Instructor-Led Training - View dates & book

splitting text in cells

Forum home » Delegate support and help forum » Microsoft Excel Training and help » Splitting Text In Cells

Splitting Text In Cells

ResolvedVersion Standard

Julia has attended:
Excel Consulting course
Excel Consulting course

Splitting Text In Cells

Hi

I have a column containing peoples full names eg Julia Foster.

How can I split these into first and last names in adjacent cells.

Julia

RE: Splitting Text In Cells

Hi Julia

To split a a persons full name in a cell use the following code:

If the Name is in cell A1 then enter code as followis in the adjacent cells:

In B1 enter =LEFT(A1,FIND(" ",A1)-1)

The LEFT function returns all characters in a string starting from the left to a defined number.

The FIND function returns the position of the space. This indicates to the LEFT function how many characters to display

By placing the -1 after the bracket we are telling the LEFT function to return the first name BUT NOT include the Space.

In C1 enter =MID(A2,FIND(" ",A2)+1,100)

The MID function returns all characters in a string starting from a predefined position in a string.

The FIND function returns the position of the space. This indicates to the MID function from where to start displaying the rest of the text.

By placing the +1 after the bracket in the middle section we are telling the MID function to return the last name BUT NOT include the Space. The 100 is to indicate how far to display the text. It allows for a very long name.

I have attached a spreadsheet as an example.

Hope this helps

Carlos

Attached files...

Split Names into two cells.xls

Excel tip:

Paste a web address into the hyperlink address field

If you copy a web address the only way to paste into the address field of the hyperlink box is to use CTRL + V. Right click paste does not work.

View all Excel hints and tips

Connect with us:

0207 987 3777

Call for assistance

Request Callback

We will call you back

Server loaded in 0.09 secs.