Macro to find a comma in a string
iPos = Instr(1,Range("A1").Value,",")
If iPos 0 Then
Activecell.Value = Right(Range("A1").Value, _
Len(Range("A1").Value) - iPos)
End If
--
HTH
RP
(remove nothere from the email address if mailing direct)
"Chuck" wrote in message
...
A1 contains LastName, FirstName
If B1 = mid(A1,1,find(",",A1)-1) then B1 will be = to the LastName.
How can I write a macro that will returen the LastName to whatever the
ActiveCell is?
Chuck L
|