ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Discussion (Misc queries) (https://www.excelbanter.com/excel-discussion-misc-queries/)
-   -   Sorting cells that have both Text and Numbers (https://www.excelbanter.com/excel-discussion-misc-queries/156917-sorting-cells-have-both-text-numbers.html)

CherylH

Sorting cells that have both Text and Numbers
 
My cells have the following data; AI-1, AI-2, AI-3, etc. I want to be able
to sort the number only.

Right now, when I sort, the sort is like this:
AI-1
AI-11
AI-12

vs.
AI-1
AI-2
AI-3

Any help is surely appreciated!

Dave Peterson

Sorting cells that have both Text and Numbers
 
You could use data|text to columns (delimited by dash) and put the fields in
separate columns.

Make sure you choose General for the number portion.
Then select your range and sort with a primary key of the number column and a
secondary key of the alpha column.



CherylH wrote:

My cells have the following data; AI-1, AI-2, AI-3, etc. I want to be able
to sort the number only.

Right now, when I sort, the sort is like this:
AI-1
AI-11
AI-12

vs.
AI-1
AI-2
AI-3

Any help is surely appreciated!


--

Dave Peterson


All times are GMT +1. The time now is 10:41 PM.

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