Automatic formatting of Significant Figures ....

  • Thread starter Thread starter CFD
  • Start date Start date
C

CFD

Hi all,

I have a table of numbers, ranging from about 0.552 to about 821. Al
numbers have exactly 3 significant figures.

Is there any way to automatically format ALL the numbers in this tabl
to show exactly 3 significant figures only, without having to resort t
exponent notation?

Thanks in advance
 
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
 
Bugger, thought as much .... :mad: You would think such a
straight-forward and immensely useful functionality would be included!

Thanks forn the response though!
 
Bugger, thought as much .... :mad: You would think such a
straight-forward and immensely useful functionality would be included!

Thanks forn the response though!

I think Excel's genesis was as a business tool. As such, some of what
mathematicians might feel is useful functionality is just not there.

I don't know if there is another tool that has the functionality for which you
are looking.


--ron
 
LOL hardly a mathamatician, who wouldn't care about sig figs anyway! No,
I'm an engineer.

And buisiness people would probably be interested as well, if you have
a table of prices and percentages, you might want all to 4 sig figs eg
$1234 and 75.33% but you cant easily format like that.

Admittedly, it is far more important for engineering applications.
 
Back
Top