Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1,670
Default How to code a macro to sort a list of string?

In cell A2, there is char 2328050010001023841.
The format for those value must be string instead of number based on Excel's
specifications,
which has 15 digit precision.

If I get a list of string under A column, does anyone have any suggestions
on how to sort it in ascending order based on macro coding?
Thank everyone very much for any suggestions
Eric
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 703
Default How to code a macro to sort a list of string?

On 18 Maj, 16:31, Eric wrote:
In cell A2, there is char 2328050010001023841.
The format for those value must be string instead of number based on Excel's
specifications,
which has 15 digit precision.

If I get a list of string under A column, does anyone have any suggestions
on how to sort it in ascending order based on macro coding?
Thank everyone very much for any suggestions
Eric


Hi

Range("A2:A100").Sort Key1:=Range("A2"), Order1:=xlAscending,
Header:=xlGuess, _
OrderCustom:=1, MatchCase:=False, Orientation:=xlTopToBottom

BTW: To enter numbers as text, enter ' (single quotation sign) before
the number.

Regards,
Per
  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 269
Default How to code a macro to sort a list of string?

"Eric" wrote in message
...
In cell A2, there is char 2328050010001023841.
The format for those value must be string instead of number based on

Excel's
specifications,
which has 15 digit precision.

If I get a list of string under A column, does anyone have any suggestions
on how to sort it in ascending order based on macro coding?
Thank everyone very much for any suggestions
Eric



See http://www.standards.com/index.html?Sorting


  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1,670
Default How to code a macro to sort a list of string?

Thank everyone very much for suggestions
Could you please give me more information on where to put those codeing?
I would like to keep column A untouch, and show the sorted results on column
B.
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
Code to automatically sort a list, each time that a new entry isadded to the bottom of the list Mike C[_5_] Excel Programming 5 April 13th 08 04:59 PM
Sort Macro: Help with code. Tail Wind Excel Discussion (Misc queries) 13 September 2nd 07 07:46 PM
macro code to sort a range ashish128 Excel Discussion (Misc queries) 5 August 17th 06 05:52 PM
Sort a list macro. John Excel Discussion (Misc queries) 1 April 28th 06 11:49 PM
Sort a list macro. John Excel Discussion (Misc queries) 2 April 28th 06 04:15 PM


All times are GMT +1. The time now is 11:16 PM.

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"