That's what I'd expect. A2-INT(A2) is going to return 0, 0.3, and 0.23,
respectively, so 1, 3, and 4 seem the right lengths for the strings. The
12.3 to 0.3 case is one where the binary representation approximation error
will return 17 as the string length if you don't do the rounding.
--
David Biddulph
"Rick Rothstein (MVP -
VB)" wrote in
message ...
I'm getting stranger results than that... for example, 123 (no decimal) is
returning 1, 12.3 is returning 3, 1.23 is returning 4, etc. Do you get
these results too?
Rick
"David Biddulph" <groups [at] biddulph.org.uk wrote in message
...
Anything with more than 2 decimal places will, of course, be rounded to
only 2 places, so I'm not sure why 2 was the chosen number (apart from
that being highest number of decimal places in the OP's examples).
--
David Biddulph
"Rick Rothstein (MVP - VB)" wrote in
message ...
Do you get your formula to work on all numbers? I have done some quick
testing and I am not seeing correct results.
Rick
"Teethless mama" wrote in
message ...
Flaw designed...
You have to use round function
=LEN(ROUND(A2-INT(A2),2))
"Yara" wrote:
Hi,
Did anybody tried the following formula:
LEN(A1-INT(A1)) the output should be the number of decimal
digits
of the number in cell A1.
Examples:
in cell A1 input the following formual: +LEN(A2-INT(A2))
in cell A2 input different numbers like the following:
Cell A2 Cell A1
2.2 3
5 1
10.25 4
9.2 17 What
100.1 18 What again !!!!
Can anyone figure what is happening
Yara