Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
David Bateman
 
Posts: n/a
Default Working with first and last names

I have the first and last names in one cell and would like to extract them
into a format that I can sort such as this "lastname, firstname". Is there a
way to do this?


  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
Bob Phillips
 
Posts: n/a
Default Working with first and last names

DataText To Columns with a space delimiter

--
HTH

Bob Phillips

(remove nothere from email address if mailing direct)

"David Bateman" wrote in message
...
I have the first and last names in one cell and would like to extract them
into a format that I can sort such as this "lastname, firstname". Is there

a
way to do this?




  #3   Report Post  
Posted to microsoft.public.excel.worksheet.functions
Ashish Mathur
 
Posts: n/a
Default Working with first and last names

Hi,

While the delimited option suggested by Bob is the best way to accomplish
this, a formula solution (Ctrl+Shift+Enter) is:

The formula assumed that the nameis in cell A16 (For e.g. Ashish Mathur)

MID(A16,MATCH(TRUE,EXACT(MID(A16,ROW($2:$13),1),PR OPER(MID(A16,ROW($2:$13),1))),0)+2,255)&",
"&MID(A16,MATCH(TRUE,EXACT(MID(A16,ROW($1:$13),1), PROPER(MID(A16,ROW($1:$13),1))),0),MATCH(TRUE,EXAC T(MID(A16,ROW($2:$13),1),PROPER(MID(A16,ROW($2:$13 ),1))),0))

Regards,

"David Bateman" wrote:

I have the first and last names in one cell and would like to extract them
into a format that I can sort such as this "lastname, firstname". Is there a
way to do this?



  #4   Report Post  
Posted to microsoft.public.excel.worksheet.functions
Ron Rosenfeld
 
Posts: n/a
Default Working with first and last names

On Sat, 18 Feb 2006 08:42:16 -0800, "David Bateman"
wrote:

I have the first and last names in one cell and would like to extract them
into a format that I can sort such as this "lastname, firstname". Is there a
way to do this?


Assuming you have no titles or suffixes, you could extract them in the format
you specify in various ways, some of which have already been posted.

You could also download and install Longre's free morefunc.xll add-in from
http://xcell05.free.fr/

Then use the formula:

=REGEX.MID(A1,"\w+",-1)&", "&REGEX.MID(A1,".*(?=\s\w+\W*$)")


--ron
Reply
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



All times are GMT +1. The time now is 03:32 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"