Amy
Assuming the lastnames and firstnames are separated by a comma, the following macro will split the selected fullnames into the next two columns to the right
Celia
Sub SplitName()
Dim cell As Range
Dim separator As Integer
'loop through each cell in the selection
For Each cell In Selection
'search for a comma
separator = InStr(cell.Value, ",")
If separator > 0 Then
'put the lastname in the first column to the right
cell.Offset(0, 1).Value = Left(cell.Value, separator - 1)
'put the firstnames in the second column to the right
cell.Offset(0, 2).Value = Mid(cell.Value, separator + 1)
End If
Next cell
End Sub
Amy
Have found a non-macro way of splitting column data that is separated by a comma.
Formula to extract characters before the comma :-
=LEFT(A1,LEN(A1)-FIND(",",A1))
Formula to extract characters after the comma :-
=RIGHT(A1,LEN(A1)-FIND(",",A1))
Celia
CORRECTION
Sorry, the formula for the characters before the comma should be :-
=LEFT(A1,FIND(",",A1)-1)