Home |
Search |
Today's Posts |
|
#1
![]()
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
![]() Hi, I am wondering if anyone can help me with the following statement. I have a number (example 1.068501) which i need to round up to 3 decimal places or 4 significant figures if the number is greater than 1 so the result would be 1.069. If the number was (example 0.926145) then we need to round up to 4 decimal places or 4 significant figures so the result would be in this example would be 0.9262. Can someone please provide me with a formula for this sort of calculation as I have a spreadsheet of over 500 numbers! Cheers in advance -- mccrimmon ------------------------------------------------------------------------ mccrimmon's Profile: http://www.excelforum.com/member.php...fo&userid=6338 View this thread: http://www.excelforum.com/showthread...hreadid=555957 |
#2
![]()
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
![]()
=round(a1,3)
hth regards from Brazil Marcelo "mccrimmon" escreveu: Hi, I am wondering if anyone can help me with the following statement. I have a number (example 1.068501) which i need to round up to 3 decimal places or 4 significant figures if the number is greater than 1 so the result would be 1.069. If the number was (example 0.926145) then we need to round up to 4 decimal places or 4 significant figures so the result would be in this example would be 0.9262. Can someone please provide me with a formula for this sort of calculation as I have a spreadsheet of over 500 numbers! Cheers in advance -- mccrimmon ------------------------------------------------------------------------ mccrimmon's Profile: http://www.excelforum.com/member.php...fo&userid=6338 View this thread: http://www.excelforum.com/showthread...hreadid=555957 |
#3
![]()
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
![]()
Hi mccrimmon,
Try =IF(A1=1,ROUND(A1,3),ROUND(A1,4)) HTH Martin |
#4
![]()
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
![]()
Hello,
We discussed this in the German newsgroup recently. Easiest presentation (worksheet function) seems to be: =TEXT(A1,"0.000E+000") Or you might want to use my UDF: Function dbl2nsig(d As Double, _ Optional n As Long = 4) _ As String 'Returns string presentation of d with 'n significant digits. PB V0.01 Dim i As Long, j As Long Dim s As String, sr As String s = Format(d, "0." & String(n - 1, "0") _ & "E+000") i = Right(s, 4) Select Case i Case Is n - 2 sr = Left(s, 1) If n 1 Then sr = sr & Mid(s, 3, n - 1) sr = sr & String(i - n + 1, "0") Case 0 sr = Left(s, n + 1) Case Is < 0 sr = "0." & String(-1 - i, "0") & Left(s, 1) _ & Mid(s, 3, n - 1) Case Else s = Left(s, 1) & Mid(s, 3, n - 1) sr = Left(s, i + 1) & "." & _ Right(s, n - i - 1) End Select dbl2nsig = sr End Function HTH, Bernd |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Rounding up Formula | Excel Worksheet Functions | |||
Dynamic Range with unused formula messing up x axis on dynamic graph | Charts and Charting in Excel | |||
How I need correct formula, that no t rounding? | Excel Worksheet Functions | |||
Rounding formula won't copy to other cells in column - why? | Excel Discussion (Misc queries) | |||
How do I get my formula to stop rounding up | Excel Worksheet Functions |