View Single Post
  #4   Report Post  
Posted to microsoft.public.excel.worksheet.functions
Rick Rothstein Rick Rothstein is offline
external usenet poster
 
Posts: 5,934
Default significant figures

Perhaps you could use this UDF (user defined function) to do that...

Function RoundSignificantFigures(Value As Variant, _
Significance As Long) As Double
Dim Num As String
Dim Parts() As String
Num = Format(Value, "0.##############################e+0;;0")
Parts = Split(CStr(Num), "E", , vbTextCompare)
If CDbl(Parts(0)) = 0 Then
RoundSignificantFigures = 0
Else
RoundSignificantFigures = CDbl(Format(Parts(0), "0" & _
Left(".", -(Significance < 0)) & _
String(Significance - 1, "0")) & _
"E" & Parts(1))
End If
End Function

Just put your calculations inside a call to this function and specify 4 for
the last argument. For example, if your cell has this simple SUM function
call

=SUM(A1:A100)

then you could change it to this...

=RoundSignificantFigures(SUM(A1:A100),4)

--
Rick (MVP - Excel)


"Crystal" wrote in message
...
Here is my dilema: Have a huge spread sheet that takes hours of manual
calculations and turns it into a 5-10min process. However i am in the
process
of validating it but in my eyes its not good enough. In my spreadsheet i
need
to keep 4 significant figures in most of my showing calc's but the input
values change. So for instance, I get .004454, 0.00004436, and 0.0004853.
I
need to keep 4 significant figures at all times. But i cannot use the
round
function the way that excel help has it definded. i can only get it to
keep
"X" amount of digets which is not what i want. Is there anything i can do
to
change this or is it asking to much of excel?

Thanks,
Crystal