View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
Ron Rosenfeld[_3_] Ron Rosenfeld[_3_] is offline
external usenet poster
 
Posts: 12
Default 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