Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.misc
Kenny Dee
 
Posts: n/a
Default How to sort by last name?

Sorry but we don't have a seperated columns for the first and last name, but
is there away to sort by last name. such as:

D. Jurgens
R. Moreno
F. Coley
D. Baird

???? Thanks
  #2   Report Post  
Posted to microsoft.public.excel.misc
Peo Sjoblom
 
Posts: n/a
Default How to sort by last name?

Use a help column, then a formula like

=TRIM(MID(A2,FIND(".",A2)+1,255))

assuming there is always an initial and a period

then select both columns and sort by the help column, then remove the help
column. If you don't always have an initial and a period but always a space
before the last name you can use

=MID(A2,FIND(" ",A2)+1,255)


and finally if there are multiple spaces but the last name is always last
and have a preceding space

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


--

Regards,

Peo Sjoblom

"Kenny Dee" wrote in message
...
Sorry but we don't have a seperated columns for the first and last name,

but
is there away to sort by last name. such as:

D. Jurgens
R. Moreno
F. Coley
D. Baird

???? Thanks



  #3   Report Post  
Posted to microsoft.public.excel.misc
Ken Hudson
 
Posts: n/a
Default How to sort by last name?

Hi Kenny,
You need to separate out the last name.
Highlight the column with the names.
Go to Data Text to Columns...
The Delimited file type should be selected.
Click Next. Choose Space as the Delimiter and then click Next.
Click Finish and then click OK to replace contents of destination cells.
This will work as long as all name entries have a space bewteen the first
initial and the last name.

Cheers.


--
Ken Hudson


"Kenny Dee" wrote:

Sorry but we don't have a seperated columns for the first and last name, but
is there away to sort by last name. such as:

D. Jurgens
R. Moreno
F. Coley
D. Baird

???? Thanks

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


Similar Threads
Thread Thread Starter Forum Replies Last Post
Select rows and sort based on type Sarah Excel Discussion (Misc queries) 0 October 11th 05 06:06 PM
data sort is not including all columns in sort Tracy Excel Discussion (Misc queries) 1 October 4th 05 01:16 AM
sorting more than 3 keys Brooke Excel Discussion (Misc queries) 3 June 18th 05 05:52 AM
"-" ignored in sort Mike H Excel Discussion (Misc queries) 8 January 2nd 05 08:48 AM
HELP! How do you--> Lock a set of rows but also link worksheets to FRUSTRATED Excel Discussion (Misc queries) 6 December 29th 04 11:05 PM


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