....just in case the file might be used in other language environments, the
following formula avoids using the decimal separator explicitly:
=IF(ISNUMBER(A1),LEN(MOD(ABS(A1),1))-1-(MOD(A1,1)0),0)
It also uses IF(ISNUMBER(A1),...,0) construct to check if there is text in
the cell A1. If there can only be numbers or empty cells then a shorter
version can be used:
=LEN(MOD(ABS(A1),1))-1-(MOD(A1,1)0)
Regards,
KL
"Bob Phillips" wrote in message
...
=IF(ISNUMBER(FIND(".",A20)),LEN(A20)-FIND(".",A20),0)
--
HTH
RP
(remove nothere from the email address if mailing direct)
"Warren Smith" wrote in message
...
The worksheet I am doing needs to look at cell values, and in another
return
the number of decimal places used in the cell.
for example
if A1 contained a number of 34.45,
I want B1 to tell me 2.
I need to know this because I want to enter the data in a table against
another set of figures which will have 1 more decimal place than the
first
set,
and I can't set the decimal places up before because I don't know how
many
there will be.
Thanks in advance for any help
Warren
|