Change order of data in a cell
Hi,
Assumes your names in column A. Right click your sheet tab, view code and
paste this in and run it
Sub sonic()
For Each c In Range("A1:A" & Cells(Rows.Count, "A").End(xlUp).Row)
lastnm = Trim(Left(c, InStr(c, " ")))
firstname = Mid(c, InStr(c, " "), Len(c))
c.Value = LTrim(firstname & " " & lastnm)
Next
End Sub
Mike
"David" wrote:
Is it possible to write a macro that will change cells that have "Last Name,
First Name, Middle Initial" to "First Name, Middle Initial, Last Name" ?
Thank you for your help.
David
|