Home : SFR
Q11325 - INFO: SFR

SFR formats the value to significant figures (digits) as specified.  

SYNTAX:

SFR(Value,SignificantDigits,MaxDecPlaces,RoundType)

Value:  Value to be formatted.  Can be value, cell reference, or another function.

SignificantDigits: Number of Significant Figures (Digits)

MaxDecPlaces: Maximum number of Decimal Places.

RoundType: Sets rounding type.  See Scientific vs Normal Rounding for more info on rounding.  Valid settings are:

1 - Scientific
2 - Normal
3 - Truncate

 

NOTES:

This function can be placed by using the Format, Rounding menu option. Rules for significant figures:

  • Digits from 1-9 are always significant.
  • Zeros between two other significant digits are always significant
  • One or more additional zeros to the right of both the decimal place and another significant digit are significant.
  • Zeros used solely for spacing the decimal point (placeholders) are not significant.

SEE ALSO:  GPREC, GDP, SFRZ, DPC

EXAMPLES:

Value Formula Result
124.2000 SFR(B3,3,3,1)  124
5.7766 SFR(B4,3,3,1)  5.78
4.6662 SFR(B5,3,1,1)  4.7
24.5000 SFR(B6,2,3,1)  24
28 SFR(B6,3,3,1) 28.0
28.5000 SFR(B7,3,3,2) 

28.5

12 SFR(B8,3,5) 12.0
0.001 SFR(B8,3,5) 0.00100
12345 SFR(B8,3,5) 12300
0 SFR(B8,3,5) 0
0.00 SFR(B8,3,5) 0
3.0447 SFR(B7,4,2,2)  3.05

Why was the last one 3.05? Examining our formula we see we wanted 4 significant digits, therefore the function narrows our number from 3.0447 to 3.045 first. Then the function rounds 3.045 by rule #2 to 2 decimal places - giving us 3.05.

 

Related Articles
No Related Articles Available.

Article Attachments
No Attachments Available.

Related External Links
No Related Links Available.
Help us improve this article...
What did you think of this article?

poor 
1
2
3
4
5
6
7
8
9
10

 excellent
Tell us why you rated the content this way. (optional)
 
Approved Comments...
No user comments available for this article.
Created on 6/5/2008 11:40 AM.
Last Modified on 11/1/2021 11:46 AM.
Last Modified by Scott Dorner.
Article has been viewed 6543 times.
Rated 3 out of 10 based on 4 votes.
Print Article
Email Article