ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Discussion (Misc queries) (https://www.excelbanter.com/excel-discussion-misc-queries/)
-   -   Sorting (https://www.excelbanter.com/excel-discussion-misc-queries/206176-sorting.html)

ccontreras

Sorting
 
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?

Sheeloo[_3_]

Sorting
 
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?


ccontreras

Sorting
 
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?


Sheeloo[_3_]

Sorting
 
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?


Gord Dibben

Sorting
 
Split into two columns using DataText to Columns delimited by space or
comma.

Select both columns and sort on last name.


Gord Dibben MS Excel MVP

On Mon, 13 Oct 2008 16:46:10 -0700, 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?



ShaneDevenshire

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?



All times are GMT +1. The time now is 09:06 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
ExcelBanter.com