Thread
:
Undesired Rounding in VBA; accumulating values
View Single Post
#
2
Posted to microsoft.public.excel.programming
Ron Rosenfeld[_3_]
external usenet poster
Posts: 12
Undesired Rounding in VBA; accumulating values
On 24 Jan 2004 17:11:00 -0800,
(Glenn Ray) wrote:
Sorry I don't have a copy of the source code handy, but here goes:
I'm reading values from a series of cells in one sheet (stored in a 2D
array), then accumulating values in a destination sheet. The array is
type Double; using XL2002.
The source data goes to three decimal places (ex. 0.245), but the
value accumulated is rounded (ex. 0.25).
Source Sheet reading:
ActiveCell.Offset(Row, Column).Value = dblArray(RV,CV)
Destination Sheet accumulating:
ActiveCell.Offset(Row, Column).Value =
ActiveCell.Offset(Row,Column).Value + dblArray(RV,CV)
-Glenn
Any clue as to why this is happening?
What is the format of ActiveCell.Offset(Row, Column)?
What is the setting of Options/Tools/Precision as displayed?
--ron
Reply With Quote
Ron Rosenfeld[_3_]
View Public Profile
Find all posts by Ron Rosenfeld[_3_]