Hi lonesoac0,
try it
![]()
Sub ttt() Dim x, i&, sp With Range("A1", Cells(Rows.Count, 1).End(xlUp)) x = .Value For i = 1 To UBound(x) sp = Split(Replace(x(i, 1), ",", "")) x(i, 1) = sp(1) & ", " & sp(0) Next i .Value = x End With End Sub
Hi lonesoac0,
try it
![]()
Sub ttt() Dim x, i&, sp With Range("A1", Cells(Rows.Count, 1).End(xlUp)) x = .Value For i = 1 To UBound(x) sp = Split(Replace(x(i, 1), ",", "")) x(i, 1) = sp(1) & ", " & sp(0) Next i .Value = x End With End Sub
I ran the code you gave me and I got the error code of: "Run-time error '13' Type Mismatch". I ran the debugger and it highlighted: "For i = 1 To UBound(x)"
Ok, so I decided to play with it a little more and I inserted two FirstName LastName and it worked just fine. Gracias.
There are currently 1 users browsing this thread. (0 members and 1 guests)
Bookmarks