> "Domenic" <domenic22@sympatico.ca> wrote...
> >This assumes that there's at least one numeric digit within the code.
[quoted text clipped - 8 lines]
> decimal numeral in A1. The formula return LEN(A1)+1 when there are no
> decimal numerals in A1.
"Domenic" <domenic22@sympatico.ca> wrote...
>After posting the formula, I have to admit that I wasn't too
>happy with it, for the very reason you cited. Maybe...
>
>=MATCH(TRUE,ISNUMBER(MID(A1,ROW(INDIRECT("1:"&LEN(A1))),1)+0),0)
...
>>>>Try...
>>>>
>>>>=MIN(SEARCH({0,1,2,3,4,5,6,7,8,9},A1&"0123456789"))
...
Your first one is MUCH, MUCH better than your latest one whether or not you
fully understand it. I wasn't criticizing your first formula, just the
inaccuracy of your caveat.
Appending the string of decimal numerals to A1 isn't necessarily a cheap
operation, and calling SEARCH repeatedly isn't cheap either. However,
they're cheaper than calling MID and ISNUMBER repeatedly. Also, INDIRECT is
volatile, so your latest formula would be recalculated all the time, whereas
your first formula would only be recalculated when A1 changes.
Domenic - 27 Jun 2005 13:05 GMT
> Your first one is MUCH, MUCH better than your latest one whether or not you
> fully understand it. I wasn't criticizing your first formula, just the
> inaccuracy of your caveat.
Oh, I see what you mean. It looks like I picked the wrong choice of
words for the caveat. What I meant was that if there wasn't at least
one numerical digit in A1, an incorrect result would be returned.
What I probably should have said is that the formula will return 1 when
A1 is empty and LEN(A1)+1 when there are no numerical digits in A1.
> Appending the string of decimal numerals to A1 isn't necessarily a cheap
> operation, and calling SEARCH repeatedly isn't cheap either. However,
> they're cheaper than calling MID and ISNUMBER repeatedly. Also, INDIRECT is
> volatile, so your latest formula would be recalculated all the time, whereas
> your first formula would only be recalculated when A1 changes.
Thanks Harlan, I appreciate the insight!