cell order

  • Thread starter Thread starter Chris
  • Start date Start date
C

Chris

I have two spread sheets with names of the same people on
them with different info on each. The master workbook
has the names in a cell as a FIRST LAST format. I want
to bring data in from another workwork which has the
names listed as LAST, FIRST. is there a marco which will
go through a column and switch the order? thanks
 
Chris,

This should work

Sub NameSwitch()
For Each Cell In Selection
a = InStr(1, Cell.Text, ",")
Last = Mid(Cell.Value, 1, a - 1)
First = Mid(Cell.Value, a + 2)
Cell.Value = First & " " & Last
Next
End Sub

Dan E
 
Back
Top