![]() |
![]() |
|
|||||||
| Excel Questions All Excel/VBA questions - formulas, macros, pivot tables, general help, etc. Please post to this forum in English only. |
![]() |
|
|
Thread Tools | Display Modes |
|
|
#1 |
|
New Member
Join Date: Mar 2002
Posts: 3
|
In column A I have employee names with surname then first name. I want to insert a formula in column B to record surname only and first name only in column c
|
|
|
|
|
|
#2 |
|
MrExcel MVP
Join Date: Feb 2002
Location: Denver, CO
Posts: 1,744
|
Text to columns would work for this, but if you prefer formula you could use
for Smith Bill in A1 =LEFT(A1,FIND(" ",A1)-1) for last and =RIGHT(A1,LEN(A1)-FIND(" ",A1)) for first for Smith, Bill in A2 =LEFT(A2,FIND(",",A2)-1) and =RIGHT(A2,LEN(A2)-FIND(",",A2)-1) good luck |
|
|
|
|
|
#3 |
|
MrExcel MVP
Join Date: Mar 2002
Location: Chicago, IL USA
Posts: 2,042
|
Hi,
What is the separator between the surname and the firstname? Usually it is a comma, but that is by no means always the case. Suppose I have the following in A1 Petrulis, Jay in B1 =LEFT(A1,SEARCH(",",A1,1)-1) Returns "Petrulis" in C1 =TRIM(RIGHT(A1,LEN(A1)-SEARCH(",",A1,1))) Returns "Jay" If you have a standard setup, this can be of use. Bye, Jay |
|
|
|
![]() |
| Bookmarks |
| Thread Tools | |
| Display Modes | |
|
|