D. R
D. R

Reputation: 53

Length of Decimal Places Including Trailing Zeros

I'd like to return in one cell the number of decimal places from another cell and I can't seem to figure out a formula to include the trailing zeros so that 1.50 returns 2 instead of 1.

Here's what I have:

=IF(LEN(AF443)-LEN(INT(AF443)) = 0, 0, LEN(AF443)-LEN(INT(AF443))-1)

Not all the decimal places are the same and some have to keep zeros for consistency (e.g. 9.00).

Upvotes: 0

Views: 3520

Answers (1)

EEM
EEM

Reputation: 6659

Assuming your number is in cell B2 try this formula:

=RIGHT(CELL("format",B2),-1+LEN(CELL("format",B2)))

enter image description here

Upvotes: 1

Related Questions