View Single Post
  #10   Report Post  
Posted to microsoft.public.excel.misc
Dana DeLouis Dana DeLouis is offline
external usenet poster
 
Posts: 947
Default Improve Excel accuracy over 15 digits

If it's simple things like this, you can get a text representation of
the answer:

=Times(111111111, 111111111)
=Times(111111111, 111111111, 2)

Returns:
12,345,678,987,654,321.00
24,691,357,975,308,642.00

This is just the very simpler version...

Function Times(ParamArray v())
Dim j As Long
Times = CDec(1)
For j = 0 To UBound(v)
Times = Times * v(j)
Next j
If WorksheetFunction.Log10(Times) 15 Then
Times = FormatNumber(Times, , , vbTrue)
End If
End Function

= = = = =
HTH :)
Dana DeLouis


brianpo wrote:
Multiplying 111111111 by 111111111 in Excel 2007 results in
12345678987654300, which is obviously wrong.
Is there a way to improve the accuracy of results over 15 digits?
Thanks, Brian