Thread: Sorting
View Single Post
  #6   Report Post  
Posted to microsoft.public.excel.misc
ShaneDevenshire ShaneDevenshire is offline
external usenet poster
 
Posts: 2,344
Default Sorting

Hi,

I second Gord's suggestion - the method of choice is always Text to Columns,
if it does the job.

But if you are going to use formulas you can shorten the second one to read:
=MID(A1,FIND(" ",A1)+1,9)

If the last names are longer than 9 characters, just increase this to 20 or
99 or whatever.

The problem with formulas is that if you need to deal with First, Middle and
Last names it becomes more complicated, while text to columns do not get more
difficult.


--
Thanks,
Shane Devenshire


"Sheeloo" wrote:

IF you have names in Col A
then enter this in B1
=LEFT(A1,FIND(" ",A1)-1)
and this in C1
=RIGHT(A1,LEN(A1)-FIND(" ",A1))
and copy down till the end of your data in A1...

This will split the name into first and last name separating on space.

You can then sort on Col C...
--
If you find this post helpful pl. choose "Yes"...


"ccontreras" wrote:

I have each name on it's own cell and stored by first name, but I want to
sort them by last name

"Sheeloo" wrote:

Your requirement is not clear...
All names in one cell of Excel or each name in its own cell?
How are the names stored - last name, first name?
Can you sample data?
--
If you find this post helpful pl. choose "Yes"...


"ccontreras" wrote:

I have a table with names, every name is in the same cell. How Do I sort by
last name if the default order is left to right? Can I change that Order?