# tricky sorting question

1. ## tricky sorting question

I need to sort all records by the last 4 digits in a particular column.
ie, my data looks like

alskjflkja0023
lkahsflkjf0021
mnslfkjas0019

I need to order all records by the last 4 digits. Any ideas on
how to go about doing that? All entries are 17 characters
long so it would be the right most 4 digits of the 17 character
string. Thanks!

2. ## Re: tricky sorting question

RobR,

I suggest a helper column, with a formula like =RIGHT(A1,4)
Bring the formula down as far as needed, and sort on that column.

Beege

"RobR" <nospam@nospam.com> wrote in message
news:OlHIPIJHGHA.1100@TK2MSFTNGP10.phx.gbl...
>I need to sort all records by the last 4 digits in a particular column.
> ie, my data looks like
>
> alskjflkja0023
> lkahsflkjf0021
> mnslfkjas0019
>
> I need to order all records by the last 4 digits. Any ideas on
> how to go about doing that? All entries are 17 characters
> long so it would be the right most 4 digits of the 17 character
> string. Thanks!
>
>

3. ## Re: tricky sorting question

Brilliant, worked perfectly. Thanks!

"Beege" <bwgilmanhah@comcast.net> wrote in message
news:43cee600_1@newsfeed.slurp.net...
> RobR,
>
> I suggest a helper column, with a formula like =RIGHT(A1,4)
> Bring the formula down as far as needed, and sort on that column.
>
> Beege
>
>
>
>
> "RobR" <nospam@nospam.com> wrote in message
> news:OlHIPIJHGHA.1100@TK2MSFTNGP10.phx.gbl...
>>I need to sort all records by the last 4 digits in a particular column.
>> ie, my data looks like
>>
>> alskjflkja0023
>> lkahsflkjf0021
>> mnslfkjas0019
>>
>> I need to order all records by the last 4 digits. Any ideas on
>> how to go about doing that? All entries are 17 characters
>> long so it would be the right most 4 digits of the 17 character
>> string. Thanks!
>>
>>

>
>

4. ## RE: tricky sorting question

sIf this is something that you have to do frequently, you may be interested
in Jim Cone's fine commercial Add-in called "SpecialSort". It will do this
as a standard feature, along with many other types of sorts...........it'a
available at

http://www.realezsites.com/bus/primitivesoftware/

Vaya con Dios,
Chuck, CABGx3

"RobR" wrote:

> I need to sort all records by the last 4 digits in a particular column.
> ie, my data looks like
>
> alskjflkja0023
> lkahsflkjf0021
> mnslfkjas0019
>
> I need to order all records by the last 4 digits. Any ideas on
> how to go about doing that? All entries are 17 characters
> long so it would be the right most 4 digits of the 17 character
> string. Thanks!
>
>
>

There are currently 1 users browsing this thread. (0 members and 1 guests)

#### Posting Permissions

• You may not post new threads
• You may not post replies
• You may not post attachments
• You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1