View Single Post
  #5   Report Post  
Posted to microsoft.public.excel.programming
Norman Jones Norman Jones is offline
external usenet poster
 
Posts: 5,302
Default Excel strange (erroneous?) decimal behaviour

Hi Doctor G,

Please ignore my suggestion.

I could only reproduce your experience if, as suggested by Tom, I had the '
Precision as displayed ' option selected and I had cell A2 formatted as a 2
decimal place number.

My apologies for my first response.

---
Regards,
Norman


"Norman Jones" wrote in message
...
Hi DoctorG,

See Chip Pearson's Rounding errors page at:

http://www.cpearson.com/excel/rounding.htm


---
Regards,
Norman



"DoctorG" wrote in message
...
Cell A1 = 4.469 with 3 decimals numeric format

if cell A2 formula is "=A1" == A2 = 4.469

if in VBA: Range("A2").Value=Range("A1").Value == A2 = 4.470
if in VBA: Range("A2").Value=Range("A1").Value * 1000 / 1000 == A2 =
4.469

Can anyone explain this please and how to avoid it?? Could it be that
there
is a SET DECIMALS TO 2 VBA environment setting that causes a 2-decimal
rounding??