cell order

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
 
D

Dan E

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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top