Automatic formatting of Significant Figures ....

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
 
R

Ron Rosenfeld

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
 
C

CFD

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

Thanks forn the response though!
 
R

Ron Rosenfeld

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
 
C

CFD

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.
 

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