View Single Post
  #3   Report Post  
Posted to microsoft.public.excel.programming
Yong Kim Yong Kim is offline
external usenet poster
 
Posts: 2
Default Excel question with variable definition

Thanks very much. It helped me to understand the problem. I really appreciate
your support.

"Gary Brown" wrote:

This is a 'bug' in Excel. For a full description, see the website below.
The website specifically goes through Excel 97 but the same is true of Excel
2003.
http://www.cpearson.com/excel/rounding.htm

To solve your problem, use the round() function.
HTH,
Gary Brown

"Yong Kim" wrote:

Hi,

I have a macro running on Excel 2003. I simply read a value from a cell
using macro in which the value is defined as single, double, or even variant,
then write the value on another cell. Now the number has some left over
values. For instance, 100.1 becomes 100.099998474121. If the original number
is an integer, then it is ok. However, any decimal number resulted in a
different number though there is about 0.1% difference. Is there something I
am doing wrong, or is this a bug? Any help would be appreciated.
--
Yong Kim