Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Sortin Numbers as Text: How?
No mater what I do Excel in its infinite wisdom sorts numbers as numbers. I
want it to sort the numbers as text. I have not tried prefixing the entered numbers with an "'". The data comes from another application as text. In my version of Excel (Excell 2000 (9.0.3821 SR1), the options button ot the Data/Sort menue will not accept new custom sort orders. Is there a way to sort text numbers as text? |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
Sortin Numbers as Text: How?
I think the only way is to add the "'" character at the front of the numeric values to force Excel to think of them as text
To quickly process all cells and add the prefix character, you may use the following macro. First select the range of cells which contains the numbers and then run the macro Sub convert_to_text( Dim cell As Objec For Each cell In Selection.Cell If IsNumeric(cell) Then cell.Value = "'" & cell.Valu Nex End Su ----- William C. Smith wrote: ---- No mater what I do Excel in its infinite wisdom sorts numbers as numbers. I want it to sort the numbers as text. I have not tried prefixing the entered numbers with an "'". The data comes from another application as text. In my version of Excel (Excell 2000 (9.0.3821 SR1), the options button ot the Data/Sort menue will not accept new custom sort orders. Is there a way to sort text numbers as text |
#3
Posted to microsoft.public.excel.programming
|
|||
|
|||
Sortin Numbers as Text: How?
To sort numbers as text (as below) the range the numbers are in must be
formatted as text. If you have already entered the data then you must either re-enter it or, Select menu item: Data / Text to Columns - then select next / next and then select text in the last screen then /Finish. I'm not sure if Excel 2000 has this feature I'm running Excel 2002. 1 10 11 12 13 14 15 16 17 18 19 2 20 21 22 -- Regards, Rocky McKinley "William C. Smith" <wcsmithx*xieee.org wrote in message ... No mater what I do Excel in its infinite wisdom sorts numbers as numbers. I want it to sort the numbers as text. I have not tried prefixing the entered numbers with an "'". The data comes from another application as text. In my version of Excel (Excell 2000 (9.0.3821 SR1), the options button ot the Data/Sort menue will not accept new custom sort orders. Is there a way to sort text numbers as text? |
#4
Posted to microsoft.public.excel.programming
|
|||
|
|||
Sortin Numbers as Text: How?
Thank you, The macro works and I can sort numbers as text
?B?RWR3aW4gVGFtIChNUyBNVlAp?= wrote in : I think the only way is to add the "'" character at the front of the numeric values to force Excel to think of them as text. To quickly process all cells and add the prefix character, you may use the following macro. First select the range of cells which contains the numbers and then run the macro. |
#5
Posted to microsoft.public.excel.programming
|
|||
|
|||
Sortin Numbers as Text: How?
Thank you Rocky. Windows 2000 does have the Text to Columns feature and it
works! "Rocky McKinley" wrote in : To sort numbers as text (as below) the range the numbers are in must be formatted as text. If you have already entered the data then you must either re-enter it or, Select menu item: Data / Text to Columns - then select next / next and then select text in the last screen then /Finish. I'm not sure if Excel 2000 has this feature I'm running Excel 2002. |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Using TEXT and &TEXT - display numbers with commas, underline text | Excel Discussion (Misc queries) | |||
Data Sortin Problem | Excel Discussion (Misc queries) | |||
VLOOKUP should compare numbers stored as text to plain numbers. | Excel Worksheet Functions | |||
Convert numbers stored as text to numbers Excel 2000 | Excel Discussion (Misc queries) | |||
Sortin method advice please | Excel Worksheet Functions |