Hello!
I am doing an excel sheet with a very big table for some calculations (tens of thousands of rows and many columns too). I must deliver the excel file with quite nice appearance, so I decided to make a VBA Macro.
Each row takes into account the previous one, and I have found that an error is introduced when using VBA (if it is not an error, the result is not the same). The interesting result comes in the very end, so the difference is quite big (I work with quite small numbers, even 1e-7)
The first idea I had was that it is a matter of precision, so I changed all the variables to Double, which is the variable type that Excel uses (I am using "not arrays" and arrays). It didn't work.
Then I configured every cell as a number with 16 decimal points, and configured excel to apply the "set precision as displayed", and it was also useless...
I have checked the VBA Macro several times, and it seems to be OK (the differences would be much bigger, I think, if it was wrong).
I must finish the file tomorrow... Any suggestions??
THANK YOU VERY MUCH!!
PS: I use Excel 2010
I am doing an excel sheet with a very big table for some calculations (tens of thousands of rows and many columns too). I must deliver the excel file with quite nice appearance, so I decided to make a VBA Macro.
Each row takes into account the previous one, and I have found that an error is introduced when using VBA (if it is not an error, the result is not the same). The interesting result comes in the very end, so the difference is quite big (I work with quite small numbers, even 1e-7)

The first idea I had was that it is a matter of precision, so I changed all the variables to Double, which is the variable type that Excel uses (I am using "not arrays" and arrays). It didn't work.
Then I configured every cell as a number with 16 decimal points, and configured excel to apply the "set precision as displayed", and it was also useless...
I have checked the VBA Macro several times, and it seems to be OK (the differences would be much bigger, I think, if it was wrong).
I must finish the file tomorrow... Any suggestions??
THANK YOU VERY MUCH!!
PS: I use Excel 2010