"NoOp" <[email protected]> wrote in message
news:[email protected]
> I've tried every combination that I can think of (even formating cells
> to text) and still cannot figure out how to sort via a column with
> data like this:
>
> Sail Number
> USA 84
> USA 604
> USA 275
> USA 35024
> USA 103
> USA 116
> USA 38747
> USA 72
> USA 40
> USA 87549
> USA 41001
> USA 52
> USA 28719
>
> Any suggestions?

Hmm, I was sure I'd done that before, but ... seems to not work for me; 
so much for my gray matter!  If only machines would do what we MEANT to 
do, not what we TOLD them to do!!  lol  Maybe just some thinking out 
loud will help you think of something:

 Right now it's doing a "machine sort", sorting on the first number and 
ignoring the length of the whole number.  So if all the sail numbers 
were the same length, it would do what you need.  I thought there would 
be a way to force the display of every number to be the same length 
using leading zeroes but I can't find a way to do that, even using 
currency or Custom.

A reasonably simple macro could be created though to make every number 
the same length as long as the total length were known to be 5 (or 
whatever).  Or enter them all originally as 5 digits, using leading 
zeroes.  00084, 00604, etc..

Better, a formula could be used to pad them out to 5 digits. It would be 
a long IF statement, one section per length that could exist, but that 
would have the advantage of maybe creating the leading zero list and 
formulae in hidden columns for the final product.
pseudo-code:   (If length=2, 000##, else nothing; (if length=3,00###, 
else nothing, etc.. (...(...(...)))))
   Now sort, then remove leading zeroes, display list.

Or, redo the list by length. Have a column of 2 digits, another 3 
digits, another for 4, 5, up to whatever te max is. The re-assemble 
after sorting into one list.  More complex formulae though and a pain to 
keep track of.

I have a feeling though I'm simply missing the right Calc setting to 
make it sort properly.  There about has to be one.  Guess I'll have to 
sit back and watch :-(

Twayne






---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to