Count digits before decimals and after decimals
After seeing Mike sir formula I realized that my formula needs some correction.
Corrected Formula:-
=IF(A1="","",LEN(INT(A1))&"-"&IF(ISERROR(LEN(MID(A1,FIND(".",A1)+1,255))),0,LE N(MID(A1,FIND(".",A1)+1,255))))
OR
=IF(A1="","",LEN(INT(A1))+IF(ISERROR(LEN(MID(A1,FI ND(".",A1)+1,255))),0,LEN(MID(A1,FIND(".",A1)+1,25 5))))
Remember to Click Yes, if this post helps!
--------------------
(Ms-Exl-Learner)
--------------------
"Elton Law" wrote:
Dear expert,
Would like to count the digits before decimals and after decimals.
For example,
111975.35 should be 6 digits before decimals and 2 digits after decimals
12456.25 should be 5 and 2
2478.24 should be 4 and 2
248.37 should be 3 and 2
Using LEN does not help.
Can you help please?
|