I need to count the numbers of decimals places of a number.
The A1 cell value is:
123456.78.
The formula in B1 is:
=LEN(MOD(A1,1))
The results of MOD(A1,1) is:
0.78
I expected the LEN to be 4 (LEN(0.78)=4). The Excel formula calculates 17 because the forumula returns:
0.779999999998836
Should I try a different approach? For example looking for the separator char?
=LEN(A1)-FIND(".",A1)
=ROUND(A1,2)
or=TEXT(A1,"0.00")
. Or you could create a named range as=GET.CELL(53,A1)
which will show the value as displayed and you can use aLEN
function on that to return 4. – Darren Bartrup-Cook