View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.programming
tomhaddock[_8_] tomhaddock[_8_] is offline
external usenet poster
 
Posts: 1
Default VBA Number Rounding

Hi

I noticed in the Immediate window that rounding numbers after dividing
them returns strange results

? ROUND(5/2, 0)
2
? ROUND(15/2, 0)
8
? ROUND(35/2, 0)
18

You can see here that the first result conflicts with the other results
logically. I would have thought that 5/2 = 2.5 would round up like the
others to 3 but instead was rounded down to 2.

Is this a bug of Excel (ver 2000) or am I doing something wrong?

Tom