hi
this is the code i found out from the web
how to make
RAJ PETER SHOUld show Raj Peter
HTML Code:
Sub macro1()
Dim firstName As String
Dim lastName As String
Dim n As Integer
Dim rowNum As Integer
Dim colNum As Integer
rowNum = 1
colNum = 1
While Cells(rowNum, colNum).Value <> ""
n = InStr(1, Cells(rowNum, colNum).Value, ",")
lastName = Left(Cells(rowNum, colNum).Value, n - 1)
firstName = Right(Cells(rowNum, colNum).Value, Len(Cells(rowNum, colNum).Value) - n - 1)
Cells(rowNum, colNum + 1).Value = firstName
Cells(rowNum, colNum + 2).Value = lastName
rowNum = rowNum + 1
Wend
End Sub