Continue to Site

Eng-Tips is the largest engineering community on the Internet

Intelligent Work Forums for Engineering Professionals

  • Congratulations KootK on being selected by the Eng-Tips community for having the most helpful posts in the forums last week. Way to Go!

Significant Digits

Status
Not open for further replies.

WillisV

Structural
Apr 24, 2005
1,352
Is there a way to have excel only display a certain number of significant digits?
 
Replies continue below

Recommended for you

You need to modify sdz formula slighly to make it work for negative numbers:
=round(Var,SigFig-int(log(abs(Var)))-1)

adding the ABS gives you the absoultue value of your number, making the formula work for negative numbers.
 
If you are willing to use extra columns and use "Precision as displayed" option, it could be done very simply as follows:

First, check "Precision as diplayed" in Tools/Options/Calculations

Col A: Using "General" number format, input orginal value
Col B: Set column number format to scientific, with the desired precision, and have the number from column A
Col C: Set column number format to "General" and set it equal to the value in column B

For some examples assuming "decimal places" for scientific format set at 3:
Col A: 156.7811
Col B: 1.568 E 2
Col C: 156.8

Col A: -0.00125668
Col B: - 1.257 E -3
Col C: -0.001257

Of course, it may be cleaner if you hide column B (and possibly column A as well) when you are done...

-- MechEng2005
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor