Reputation: 53
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
Reputation: 6659
Assuming your number is in cell B2
try this formula:
=RIGHT(CELL("format",B2),-1+LEN(CELL("format",B2)))
Upvotes: 1