Re: Sorting alphanumeric
- From: KWBock <KWBock@xxxxxxxxxxxxxxxxxxxxxxxxx>
- Date: Wed, 22 Jun 2005 14:39:03 -0700
Jim,
Thanks for the reference. It sounds like it would work. However, I'm very
inexperienced when it comes to macros/VBA. I tried entering the code that you
had in the referenced post, but I couldn't get it to run. Do you have
simplified instructions on where to enter the code and how to get it to run?
I apologize for my inexperience. But I appreciate you taking the time to
help. Thanks.
K. Bock
"Jim Cone" wrote:
> K,
>
> Maybe this recent post of mine will help...
>
> http://makeashorterlink.com/?R2B662F4B
>
> The code in the post creates additional data columns that can be
> used to sort. These are:
> "Length", "Prefix", "Padded #", "Suffix", "Combined", "Reversed"
>
> In the "Padded #" column, the program pulls the last (right most)
> group of contiguous numbers from each cell.
> It pads the group with enough leading zeros so as to equal the
> length of the longest group in the entire selection.
> This allows the selection to be sorted in strict numerical order.
>
> Jim Cone
> San Francisco, USA
>
>
>
>
> "KWBock" <KWBock@xxxxxxxxxxxxxxxxxxxxxxxxx> wrote in message
> news:0CB9A968-9755-4AEC-9069-29DDBD70C554@xxxxxxxxxxxxxxxx
> I've been searching through several old topics on alphanumeric sorts and have
> not seen any problem that resembles mine. So, any help is appreciated.
>
> I have a work*** with several columns (~10). I am currently sorting this
> work*** based on three columns (e.g. A then B then C). Column A is a
> text-formatted family name for a group of data within the work***. Column B
> is a family number. This further breaks down the families into "subfamilies,"
> if you will, based on the family numbers. The final column is each item's
> name, which are alphanumeric. Here is a very crude representation of this
> that hopefully is easier to understand:
>
> COLUMN A COLUMN B COLUMN C
> AMF 1 item1
> FAM 1 item10
> FAM 1 item2
> FAM 2 item45
> FAM 3 item67
> FAM 3 item7
>
> The problem is the sorting that Excel does in Column C. All of the cells are
> formatted as text because there is text present. Because of this, if I have
> say ten items under one family number, Excel will sort 1, 10, 2, 3, 4, and so
> on. I want item10 to be last in this instance. I know one easy fix would be
> to make item1 item01. But that would ultimately change the name of each item
> (the actual names are more elaborate than "item1" and are published without
> the added zero, so it wouldn't be kosher to add a number) and take too much
> time.
> Is there any other way to get column C to sort the way I want?
> Thanks in advance.
> K
.
- Follow-Ups:
- Re: Sorting alphanumeric
- From: Jim Cone
- Re: Sorting alphanumeric
- References:
- Sorting alphanumeric
- From: KWBock
- Re: Sorting alphanumeric
- From: Jim Cone
- Sorting alphanumeric
- Prev by Date: Shadow/duplicate excel file .xls:2
- Next by Date: Cell always equals 'C: regardless of computer
- Previous by thread: Re: Sorting alphanumeric
- Next by thread: Re: Sorting alphanumeric
- Index(es):