Sorry for not giving more detailed title, but it is because of this special case. My google search did not give me any similar topic.
The following simple code should give a series of numbers from 0.1 to 10 with step 0.1 (I hoped at least) in column A:
Cells(1, 1) = 0.1
For i = 2 To 100
Cells(i, 1) = Cells(i - 1, 1) + 0.1
Next i
Until 5.9 it works well, but after that the result is not as expected:
instead of 6 I get 5,99999999999999
instead of 6.1 I get 6,09999999999999
instead of 6.2 I get 6,29999999999999
...
Could anyone explain what is wrong with the code or why I get this result?
Thanks!