On Wed, 21 Sep 2005 19:56:49 -0500, CFD
wrote:
Hi all,
I have a table of numbers, ranging from about 0.552 to about 821. All
numbers have exactly 3 significant figures.
Is there any way to automatically format ALL the numbers in this table
to show exactly 3 significant figures only, without having to resort to
exponent notation?
Thanks in advance!
No you cannot do that with formatting.
You would have to "round" the number to three significant digits; then format
as General.
Worksheet formula:
=ROUND(A12,TRUNC(-LOG(ABS(A12)))+3-(ABS(A12)1))
or VBA UDF:
=======================
Function RoundSigDigits(N As Double, SigDigits As Integer) As Double
RoundSigDigits = Application.WorksheetFunction.Round _
(N, Fix(-Log(Abs(N)) / Log(10)) + SigDigits + (Abs(N) 1))
End Function
======================
--ron
|