ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   How to separate fname and fname in cell in excel (https://www.excelbanter.com/excel-programming/302618-how-separate-fname-fname-cell-excel.html)

Excel Problem

How to separate fname and fname in cell in excel
 
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

Tom Ogilvy

How to separate fname and fname in cell in excel
 
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" <Excel wrote in message
...
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




Don Guillett[_4_]

How to separate fname and fname in cell in excel
 
datatext to columns is probably the easiest
or
a macro

--
Don Guillett
SalesAid Software

"Excel Problem" <Excel
wrote in message
...
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





All times are GMT +1. The time now is 05:28 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com