How to separate fname and fname in cell in excel

E

Excel Problem

Can soneone help me to wright a formula that will separate lname and fname in cell "B" to Cell"A "=lname and cell"B"=fname. Thy are separate by comma and space in cell "B" in excel 2000.
My e-mail address is [email protected]
 
T

Tom Ogilvy

Sub AABA()
Set cell = ActiveCell
If InStr(cell, ",") Then
iloc = InStr(cell, ",")
cell.Offset(0, -1).Value = Left(cell.Value, iloc - 1)
cell.Value = Right(cell.Value, Len(cell.Value) - (iloc + 1))
End If

End Sub

--
Regards,
Tom Ogilvy



Excel Problem said:
Can soneone help me to wright a formula that will separate lname and
fname in cell "B" to Cell"A "=lname and cell"B"=fname. Thy are separate by
comma and space in cell "B" in excel 2000.
 
D

Don Guillett

data>text to columns is probably the easiest
or
a macro

--
Don Guillett
SalesAid Software
[email protected]
Excel Problem said:
Can soneone help me to wright a formula that will separate lname and
fname in cell "B" to Cell"A "=lname and cell"B"=fname. Thy are separate by
comma and space in cell "B" in excel 2000.
 
Top