Forum Discussion
NeilKloster
May 20, 2021Brass Contributor
Change names in excel cells
Hello, I have a report that is exported from another system that looks like this: But I want to figure out a way to have the names in the first column look like this without manually ...
- May 20, 2021hans - you continue to amaze me! Thank you so much that worked perfectly!!
HansVogelaar
May 20, 2021MVP
I'm sorry, I forgot to change the order of first name and last name.
Sub ExtractNames()
Dim rng As Range
Dim s As String
Dim a() As String
Application.ScreenUpdating = False
For Each rng In Range(Range("A2"), Range("A2").End(xlDown))
s = rng.Value
s = Left(s, InStr(s, "(") - 2)
a = Split(s, ", ")
rng.Value = a(1) & " " & a(0)
Next rng
Application.ScreenUpdating = True
End SubNeilKloster
May 20, 2021Brass Contributor
hans - you continue to amaze me! Thank you so much that worked perfectly!!