I have the following 4 rows and I wish to find the decimal length (aka scale) of that decimal value. Do note that I'm importing all of the decimal data in Excel whose cell is formatted in a "Text" format (hence the trailing zeros even after the decimal values). And I do not want to convert it into decimal. I just need to find the scale of that decimal number.
Decimal Number | Scale (Formula?) |
---|---|
106.520000 | 2 |
0.080100 | 4 |
15.000010 | 5 |
265.000000 | 0 |
Been struggling for a very long time now. I'd appreciate any lead on this.
CodePudding user response:
This is what I have tried,
• Formula used in cell B2
=LEN(MID(NUMBERVALUE(A2),FIND(".",A2) 1,255))
CodePudding user response:
You could try:
Formula in B2
:
=MAX(LEN(-A2)-LEN(INT(A2))-2,0)
Note: I use a decimal comma but it shouldnt matter for you.