Forgive me for taking so long to reply back...I was trying to make this thing
work for me...
If I take the followng stock numbers and place them in column A:
392001C074866
00144SPXFRM2A1
389852424040410
392001C044B236
3920PSA274N
9999080002158
The formuli you both gave me return results of:
TRUE
FALSE
FALSE
TRUE
FALSE
FALSE
For my purposes, only cells A1 and A6 are true. In looking at the data in
the cells, it appears that there are some embedded spaces at the ends of the
cell, meaning that the cell length (or string length) is really 16 vice the
13 I told you about earlier. My rudimentary understanding allowed me to
change the formula to reflect (LEN(A1)=16, however, no manner of hair pulling
or teeth gnashing got me to figure out how to get the others to come out
correctly.
Idealy I would like to get a false on any string longer than 13 (in a cell
which contains 16 "spaces"), anything which isn't a pure numeric (something I
failed to mention earlier and failed to figure out on my own), and anything
which has an alpha character in anything but the 7th spot.
Thanks in advance for your earlier help!
Greg Wilson said:
I don't know how the sort order is decided. It's not simply based on
character code since, for example
="[" > "A"
returns False. The above character codes are respectively 91 and 65.
The UPPER in the formula also appears to be redundant since lower case and
upper case are treated equal. For example:
="a"="A"
returns TRUE.
Based on limited testing, it appears that all alphabetics are treated as
greater than any other character and sort correctly relative to each other
*with lower and upper case treated equal*. Also, numbers are greater than any
other character except alphabetics. For example:
="1" > "["
returns TRUE while these character codes are respectively 49 and 91. Numbers
also sort correctly relative to each other.
All other characters appear to sort correctly relative to each other based
on character code but are less than both alphabetics and numbers. To
summarize:
Alphabetics (lower and upper same) > numbers > all other characters
Again, all of this based on very limited testing.
Greg