LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 187
Default parse text string

Let's say I have a bunch of names, such as:

John Doe
Jane Doe
Jim Doe

and I want to re-arrange them as
Doe, John
Doe, Jane
Doe, Jim

I can figure out that a formula to do this is: =MID(A2,FIND("
",A2,1)+1,LEN(A2)) & ", " & LEFT(A2,FIND(" ",A2)) etc.

However, if the name is John M Doe the above returns M Doe, John which
isn't too helpful.

So is there a single formula I can use to parse names, whether they
are First Last or First Middle Initial Last to return Last First or
Last First Middle Initial?

I'm also open to using VBA if that is a better solution.

Thanks,

Dave

 
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Parse this string David Excel Discussion (Misc queries) 2 February 20th 07 04:57 AM
How to parse a string with a date? [email protected] Excel Worksheet Functions 1 June 13th 06 07:46 AM
Word could not parse your query options into a valid sql string Lizzzzzzzz Excel Discussion (Misc queries) 4 April 24th 06 12:08 PM
Parse data where break is a first uppercase character in a string? Glen Excel Worksheet Functions 5 April 16th 06 07:28 PM
Q: parse string JIM.H. Excel Discussion (Misc queries) 3 October 22nd 05 01:45 AM


All times are GMT +1. The time now is 01:33 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"