#1   Report Post  
William
 
Posts: n/a
Default sort alphanumeric

I want to sort data that contains numbers and letters. I have tried
formatting the row as text and it still does not work. Everytime I sort it
doesn't list the entires in order but rather the numbers first then the
numbers with letters next. Here is what im trying to sort:

1227
1244
1257
1277
1289
1421
1422
1423
1431
1432
1438
1494
1572
1258-A
1258-B
1258-C
1258-D
1258-F
1258-G
1273-A
1273-B
1273-C
1273-D
1273-E
1273-F
1403-E
1403-G

Can anyone Help!

  #2   Report Post  
Sloth
 
Posts: n/a
Default sort alphanumeric

If you input a number and then change the format to text, the change does not
"set in" right away. I copied and pasted your list into excel and sorted to
get the result you got. I then changed the format to text and got the same
result. I then hit F2 and then enter for each cell in the list. At this
point it sorted correctly. On way to avoid this, is to use an ' (apostrophe)
before numbers that should be text. This formats it as text to begin with.

1227
1244
1257
1258-A
1258-B
1258-C
1258-D
1258-F
1258-G
1273-A
1273-B
1273-C
1273-D
1273-E
1273-F
1277
1289
1403-E
1403-G
1421
1422
1423
1431
1432
1438
1494
1572

"William" wrote:

I want to sort data that contains numbers and letters. I have tried
formatting the row as text and it still does not work. Everytime I sort it
doesn't list the entires in order but rather the numbers first then the
numbers with letters next. Here is what im trying to sort:

1227
1244
1257
1277
1289
1421
1422
1423
1431
1432
1438
1494
1572
1258-A
1258-B
1258-C
1258-D
1258-F
1258-G
1273-A
1273-B
1273-C
1273-D
1273-E
1273-F
1403-E
1403-G

Can anyone Help!

  #3   Report Post  
Bryan Hessey
 
Posts: n/a
Default sort alphanumeric


William,

Try a helper column (a spare column for sorting purposes only, hidden
if required) with something like:

=IF(ISERROR(A1+0),1,0)

and formula copy to the end of your data.
Then sort over helper (ascending) and column A (ascending)



William Wrote:
I want to sort data that contains numbers and letters. I have tried
formatting the row as text and it still does not work. Everytime I
sort it
doesn't list the entires in order but rather the numbers first then
the
numbers with letters next. Here is what im trying to sort:

1227
1244
~~
1494
1572
1258-A
1258-B
~~
1403-E
1403-G

Can anyone Help!



--
Bryan Hessey
------------------------------------------------------------------------
Bryan Hessey's Profile: http://www.excelforum.com/member.php...o&userid=21059
View this thread: http://www.excelforum.com/showthread...hreadid=482979

  #4   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 1
Default sort alphanumeric

I have the same problem as William, but your solution does not work on my
data. What other suggestions might you have?

"Sloth" wrote:

If you input a number and then change the format to text, the change does not
"set in" right away. I copied and pasted your list into excel and sorted to
get the result you got. I then changed the format to text and got the same
result. I then hit F2 and then enter for each cell in the list. At this
point it sorted correctly. On way to avoid this, is to use an ' (apostrophe)
before numbers that should be text. This formats it as text to begin with.

1227
1244
1257
1258-A
1258-B
1258-C
1258-D
1258-F
1258-G
1273-A
1273-B
1273-C
1273-D
1273-E
1273-F
1277
1289
1403-E
1403-G
1421
1422
1423
1431
1432
1438
1494
1572

"William" wrote:

I want to sort data that contains numbers and letters. I have tried
formatting the row as text and it still does not work. Everytime I sort it
doesn't list the entires in order but rather the numbers first then the
numbers with letters next. Here is what im trying to sort:

1227
1244
1257
1277
1289
1421
1422
1423
1431
1432
1438
1494
1572
1258-A
1258-B
1258-C
1258-D
1258-F
1258-G
1273-A
1273-B
1273-C
1273-D
1273-E
1273-F
1403-E
1403-G

Can anyone Help!

  #5   Report Post  
Posted to microsoft.public.excel.misc
Kim Kim is offline
external usenet poster
 
Posts: 284
Default sort alphanumeric

This works for me except for the numbers that are multiple digits. Any
suggestions?
example:
1
1a
2
3
4
10
10a
10b
11
200
200a
200b

"Sloth" wrote:

If you input a number and then change the format to text, the change does not
"set in" right away. I copied and pasted your list into excel and sorted to
get the result you got. I then changed the format to text and got the same
result. I then hit F2 and then enter for each cell in the list. At this
point it sorted correctly. On way to avoid this, is to use an ' (apostrophe)
before numbers that should be text. This formats it as text to begin with.

1227
1244
1257
1258-A
1258-B
1258-C
1258-D
1258-F
1258-G
1273-A
1273-B
1273-C
1273-D
1273-E
1273-F
1277
1289
1403-E
1403-G
1421
1422
1423
1431
1432
1438
1494
1572

"William" wrote:

I want to sort data that contains numbers and letters. I have tried
formatting the row as text and it still does not work. Everytime I sort it
doesn't list the entires in order but rather the numbers first then the
numbers with letters next. Here is what im trying to sort:

1227
1244
1257
1277
1289
1421
1422
1423
1431
1432
1438
1494
1572
1258-A
1258-B
1258-C
1258-D
1258-F
1258-G
1273-A
1273-B
1273-C
1273-D
1273-E
1273-F
1403-E
1403-G

Can anyone Help!

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
Sort - alphanumeric. Brad New Users to Excel 2 October 31st 05 10:11 PM
how can I sort alphanumeric entries by number in excel beasleyb Excel Worksheet Functions 1 October 27th 05 10:17 PM
Select rows and sort based on type Sarah Excel Discussion (Misc queries) 0 October 11th 05 05:06 PM
Alphanumeric Sort Ray Excel Discussion (Misc queries) 5 May 20th 05 08:02 PM
Alphanumeric Sort Arturo Excel Discussion (Misc queries) 3 March 2nd 05 06:19 PM


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

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"