I have a listing of people that are in program at my university. The cells of the Excell sheet are formated "Lastname, Firstname Middlename". I'm working on doing a mail merge, so I need them in "Firstname Middlename Lastname" format.
I have learned a few things about spilt, but I don't know how to reorder the cell. This is what I have:
I need some way of deleting "len(lName)+ 2" (+ 2 for ", ") spaces from the front of the cell, but I don't know how to do that.
Any ideas?
Thanks,
Kanan
I have learned a few things about spilt, but I don't know how to reorder the cell. This is what I have:
Code:
Private Sub CommandButton1_Click()
Dim Name As String
Dim lName As String
Dim fName As String
Dim i As Integer
i = 2
While Cells(i, "a").Value >= "0"
Name = Cells(i, "b").Value
'lName = Split(Name, ",")
i = i + 1
Wend
End Sub
I need some way of deleting "len(lName)+ 2" (+ 2 for ", ") spaces from the front of the cell, but I don't know how to do that.
Any ideas?
Thanks,
Kanan