Split cell content in excel

LaraC

Honorary Master
Joined
Mar 11, 2014
Messages
42,673
Reaction score
1,847
Hello all excel gurus. I would like to call on your expertise and ask for advice.

I have a column with the surname and initials (SURNAME ABC) of all our customers and would like to separate it into two columns.
I've found that it is not that easy because Excel doesn’t provide a function to do a reverse find for a character.
I prefer to do it without using VBA.

Any hints would be very helpful. :)
 
go to DATA tab
find TExt to colums.
use other delimiter, add a space.
boom.
 
Hello all excel gurus. I would like to call on your expertise and ask for advice.

I have a column with the surname and initials (SURNAME ABC) of all our customers and would like to separate it into two columns.
I've found that it is not that easy because Excel doesn’t provide a function to do a reverse find for a character.
I prefer to do it without using VBA.

Any hints would be very helpful. :)

I'd use the Text-To-Columns feature - use the space between Surname and Initials as the delimiter

Edit: Yes, surnames like Van Der Merwe would be problematic
 
I'd use the Text-To-Columns feature - use the space between Surname and Initials as the delimiter

Won't work if you have surnames containing spaces.

To find the index of the last space in a cell, use the following:

Code:
=SEARCH("@",SUBSTITUTE(AP5," ","@",LEN(AP5)-LEN(SUBSTITUTE(AP5," ",""))))

In "A BC" it will return 2.
 
Hello all excel gurus. I would like to call on your expertise and ask for advice.

I have a column with the surname and initials (SURNAME ABC) of all our customers and would like to separate it into two columns.
I've found that it is not that easy because Excel doesn’t provide a function to do a reverse find for a character.
I prefer to do it without using VBA.

Any hints would be very helpful. :)

Assuming there is a space between the surname and initials:

Highlight the column of info
Go to the Data tab on the ribbon
Click "Text to column"
Make sure the "Delimited" radio button is selected, and click next
In the "Delimiters" checkbox group, make sure "Space" is selected
Click finish

Edit: If you've got surnames like "Van Wyk" etc, tough.
 
Won't work if you have surnames containing spaces.

To find the index of the last space in a cell, use the following:

Code:
=SEARCH("@",SUBSTITUTE(AP5," ","@",LEN(AP5)-LEN(SUBSTITUTE(AP5," ",""))))

In "A BC" it will return 2.
It will return an error when the surname consist of more than one name.
 
This was how tried it but it failed when people had more than four initials. :D

=TRIM(MID(D2;FIND(" ";D2;LEN(D2)-4);10))
 
Top
Sign up to the MyBroadband newsletter
X