ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Discussion (Misc queries) (https://www.excelbanter.com/excel-discussion-misc-queries/)
-   -   how to sort A to Z AND 0 to 9? (https://www.excelbanter.com/excel-discussion-misc-queries/35384-how-sort-z-0-9-a.html)

Jabber

how to sort A to Z AND 0 to 9?
 
I don't use Excel much.

I would like the following document numbers sorted like this:
AR4714a
AR4714b
AR4714z
AR4714aa
AR4714ab

I'm getting them sorted like this:
AR4714a
AR4714aa
AR4714ab
AR4714b
AR4714z

Is there an easy solution to this?

Thank you,
Jabber



Dave O

Using your sample data, and assuming it is in cell A1:A5, enter this
formula in B1:
=LEN(A1)

Copy cell B1 and paste it into B2:B5. This generates the length- the
number of columns- in your document number. Then when you sort, sort
first on column B, and then on column A.


Bob Phillips

What is wrong with that order?

--

HTH

RP
(remove nothere from the email address if mailing direct)


"Jabber" wrote in message
...
I don't use Excel much.

I would like the following document numbers sorted like this:
AR4714a
AR4714b
AR4714z
AR4714aa
AR4714ab

I'm getting them sorted like this:
AR4714a
AR4714aa
AR4714ab
AR4714b
AR4714z

Is there an easy solution to this?

Thank you,
Jabber





Jabber

The letters following the number is a revision level for the document. When
we have reached the final letter "z" we go to "aa." I would like these
listed in their sequential order.
AR4714a
AR4714b
....
AR4714z
AR4714aa
AR4714ab

Jabber

"Bob Phillips" wrote:

What is wrong with that order?

--

HTH

RP
(remove nothere from the email address if mailing direct)


"Jabber" wrote in message
...
I don't use Excel much.

I would like the following document numbers sorted like this:
AR4714a
AR4714b
AR4714z
AR4714aa
AR4714ab

I'm getting them sorted like this:
AR4714a
AR4714aa
AR4714ab
AR4714b
AR4714z

Is there an easy solution to this?

Thank you,
Jabber






Jabber

This did not work. Any other solutions?

"Dave O" wrote:

Using your sample data, and assuming it is in cell A1:A5, enter this
formula in B1:
=LEN(A1)

Copy cell B1 and paste it into B2:B5. This generates the length- the
number of columns- in your document number. Then when you sort, sort
first on column B, and then on column A.



Jabber

I sorted wrong. This DID resolve my problem.

Thank you so much.

"Dave O" wrote:

Using your sample data, and assuming it is in cell A1:A5, enter this
formula in B1:
=LEN(A1)

Copy cell B1 and paste it into B2:B5. This generates the length- the
number of columns- in your document number. Then when you sort, sort
first on column B, and then on column A.




All times are GMT +1. The time now is 12:38 AM.

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