Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 9
Default 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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 48
Default 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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 102
Default 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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 9
Default 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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 9
Default 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
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
Using TEXT and &TEXT - display numbers with commas, underline text Gary Excel Discussion (Misc queries) 3 May 5th 23 03:46 AM
Data Sortin Problem Dado Excel Discussion (Misc queries) 1 August 28th 09 08:54 PM
VLOOKUP should compare numbers stored as text to plain numbers. VLOOKUP - Numbers stored as text Excel Worksheet Functions 0 March 31st 06 05:53 PM
Convert numbers stored as text to numbers Excel 2000 Darlene Excel Discussion (Misc queries) 6 January 31st 06 08:04 PM
Sortin method advice please Zipadeedoodaa Excel Worksheet Functions 2 January 17th 06 08:53 PM


All times are GMT +1. The time now is 10:41 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"