Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations TouchToneTommy on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Swap lastname, firstname in excel field

Status
Not open for further replies.

bygeek

IS-IT--Management
May 12, 2002
533
US
I have a database I'm importing into Excel. The names are in one field listed as Lastname, Firstname. Is there any easy way to change the order in the field to Firstname Lastname before I export it to Outlook contacts?
 


Hi,

I assume that the last & First are separated by a comma, WITHOUT FAIL.

In your original Query...
Code:
Select .... trim(left([Name],instr([Name],',')-1)) as Last, trim(right([Name],len([Name])-instr([Name],','))) as First


Skip,

[glasses] [red]Be advised:[/red]We know Newton's 3 Laws. But did you hear about the [red]FOURTH???[/red]
Only ONE fig per cookie![tongue]
 
Try this formula in Excel (with I14 being the "Lastname, Firstname" cell):

=RIGHT(I14,LEN(I14)-(FIND(",",I14,1)+1)) & " " & LEFT(I14,(FIND(",",I14,1)-1))

Hope that helps.

Kevin
 
GoDawgs, I tried yours first and it worked like a charm! No offense, SkipVought, I'm sure your would have worked also, just did what was easiest for me.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top