LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #4   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 35,218
Default separating first and last names

The line broke in the wrong spot.

Maybe...

=MID(A2,FIND("~",SUBSTITUTE(A2," ","~",
LEN(A2)-LEN(SUBSTITUTE(A2," ",""))))+1,255)

(The =substitute() actually inserts the ~ character.)



"Tom G." wrote:

I am receiving an #VALUE error.

Thanks bob, from what I can understand, you are doing a "find" for the ~,
however, this character does not exist. Am I missing something. I am looking
to always use the last word in the column (there is never a comma
delineating the different names - only text).

TIA.

"Bob Phillips" wrote in message
...
=MID(A2,FIND("~",SUBSTITUTE(A2," ","~",LEN(A2)-LEN(SUBSTITUTE(A2,"
",""))))+1,255)

--
HTH

Bob Phillips

(replace somewhere in email address with gmail if mailing direct)

"Tom G." wrote in message
...
I have a column with a variety of first and last name variations:

Joe Smith
Joe John Jones
Tom Jack Stuart Apple
Maria Lois Lane
Johann Sebastian Bach


I need to be able to sort them on their last name. Note that there is no
comma separating their names and that there can be any number of names,
HOWEVER, the last name always appears LAST.

Probably, in order to make some sort of order out of this mess, it would

be
best if I create two separate columns: first names, last name.

Any help will be appreciated.

--


cheers,
Tom G





--

Dave Peterson
 
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 07:12 AM.

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

About Us

"It's about Microsoft Excel"