return significant digits of a cell

C

Chace

Is there a function I can used to return the # of significant digits of a
cell value.
ie. If cell A2 = 1.042, I want cell B2 to equal 3

Thanks,
Chace
 
D

Domenic

If by 'significant digits' you mean digits that do not equal zero, try...

=SUM(IF(ISNUMBER(MID(A2,ROW(INDIRECT("1:"&LEN(A2))),1)+0),IF(MID(A2,ROW(I
NDIRECT("1:"&LEN(A2))),1)+0>0,1)))

....confirmed with CONTROL+SHIFT+ENTER, not just ENTER.

Hope this helps!
 
B

Bernard Liengme

The value 1.042 has 4 significant digits but 0.142 has three as has 1420
Do you mean the number of decimal places?
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top