separating a list

  • Thread starter Thread starter Brian
  • Start date Start date
B

Brian

I have a column of names 1800 rows long in the format
Last, First Middle that I would like to separtate into two
columns Last and First Middle - sort of like a reverse
concatentate.

Any suggestions?

Brian
 
Hi,



First, save your book, put your active cell in the column you want to split
and then try this code:



Sub SepName()

Dim rg As Range

Dim intR As Integer

On Error Resume Next

For Each rg In ActiveCell.CurrentRegion

rg.Offset(0, 1) = Left(rg.Text, InStr(rg.Text, ",") - 1)

rg.Offset(0, 2) = Trim(Right(rg.Text, Len(rg.Text) - InStr(rg.Text,
",")))

Next rg

End Sub
 
Back
Top