In searching this site I found the following 2 formulas which I had hoped would be the solution to my problem.
=IF(A2="","",ROUND(A2,2-(1+INT(LOG10(ABS(A2))))))
=TEXT(A2,"0.0E+00")*1
Both work great in displaying an entered value of .981 as 0.98 (2 significant digits)
However, if a value of 1 is entered, I would expect these formulas to display 1.0 (2 significant digits).
I'm assuming the issue is Excel's ever-so-helpful removal of trailing zeros and can be overcome by custom formatting cells to avoid this. The problem I have is the user wants the option to vary significant digits as 2, 3 or 4. Even with custom formatting, I can't get these formulas to show more than 2 significant digits if a value of 1 [or any other whole number] is entered.
Any suggestions?
=IF(A2="","",ROUND(A2,2-(1+INT(LOG10(ABS(A2))))))
=TEXT(A2,"0.0E+00")*1
Both work great in displaying an entered value of .981 as 0.98 (2 significant digits)
However, if a value of 1 is entered, I would expect these formulas to display 1.0 (2 significant digits).
I'm assuming the issue is Excel's ever-so-helpful removal of trailing zeros and can be overcome by custom formatting cells to avoid this. The problem I have is the user wants the option to vary significant digits as 2, 3 or 4. Even with custom formatting, I can't get these formulas to show more than 2 significant digits if a value of 1 [or any other whole number] is entered.
Any suggestions?