PC Review


Reply
Thread Tools Rate Thread

Custom Sort Routine

 
 
TheObstacleIsThePath@gmail.com
Guest
Posts: n/a
 
      10th Oct 2008
I have a header and several rows of data that i'd like to routinely
sort in a peculiar way:

There is a field that consists of a 1 alphanumeric character followed
by 5 numeric characters.

Ex: a123434, b234344, 434563, etc.

I'd like to create a function that sorts these numbers by their last
three (numeric) digits.

The only method I know is copy the entire sheet to a temp sheet,
ammend each row with an ordinal value, and then copy the contents back
to the original sheet in the correct order.

Another method i've considered is a hidden row with a formula
resembling this; right(a1,3). I would then sort by this hidden row.

Does anyone have a more elegant VBScript option?
 
Reply With Quote
 
 
 
 
Joel
Guest
Posts: n/a
 
      10th Oct 2008
The hidden column method is the usual method of doing this sort.

"(E-Mail Removed)" wrote:

> I have a header and several rows of data that i'd like to routinely
> sort in a peculiar way:
>
> There is a field that consists of a 1 alphanumeric character followed
> by 5 numeric characters.
>
> Ex: a123434, b234344, 434563, etc.
>
> I'd like to create a function that sorts these numbers by their last
> three (numeric) digits.
>
> The only method I know is copy the entire sheet to a temp sheet,
> ammend each row with an ordinal value, and then copy the contents back
> to the original sheet in the correct order.
>
> Another method i've considered is a hidden row with a formula
> resembling this; right(a1,3). I would then sort by this hidden row.
>
> Does anyone have a more elegant VBScript option?
>

 
Reply With Quote
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Sort Routine =?Utf-8?B?UGxhdGludW0gZ2lybA==?= Microsoft Excel Misc 0 9th Mar 2007 03:21 PM
Generalising sort routine lexcel Microsoft Excel Programming 0 3rd Jun 2006 02:57 PM
Sort Routine VBA =?Utf-8?B?d2VlcGVy?= Microsoft Excel Programming 2 29th Sep 2004 02:59 PM
Need a Special Sort Routine =?Utf-8?B?d2VlcGVy?= Microsoft Excel Programming 0 28th Sep 2004 07:49 PM
Solver: what sort of routine ajohns@freeuk.com Microsoft Excel Misc 1 20th Aug 2003 06:26 PM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 12:41 AM.