Greetings.
I'm developing a spreadsheet to an accounting firm with tight deadlines and I'm facing a really frustrating issue.
I'm doing calculations with currency on a vba sub. The values (in currency) are stored in multidimensional array as single. As I have to perform some divisions, the result I get has more than 2 decimal places. Then I use the round function to convert the value to 2 decimal places. I've checked the values by adding a break point and seeing the stored values in my array in locals. They HAVE two decimal places. But, when I write this variable using worksheets("gsjdk").cells(i,j).value=myarray(k,m), the value pasted in that cell has several more decimal places! This really can't happen and I can't figure out what's happening. I've even tried using worksheets("gsjdk").cells(i,j).value=round(myarray(k,m),2), but the problem persists.
Can somebody be kind enough to help me please? As I said, I have a very tight deadline and I'm starting to get desperate.
Thank you very much!
I'm developing a spreadsheet to an accounting firm with tight deadlines and I'm facing a really frustrating issue.
I'm doing calculations with currency on a vba sub. The values (in currency) are stored in multidimensional array as single. As I have to perform some divisions, the result I get has more than 2 decimal places. Then I use the round function to convert the value to 2 decimal places. I've checked the values by adding a break point and seeing the stored values in my array in locals. They HAVE two decimal places. But, when I write this variable using worksheets("gsjdk").cells(i,j).value=myarray(k,m), the value pasted in that cell has several more decimal places! This really can't happen and I can't figure out what's happening. I've even tried using worksheets("gsjdk").cells(i,j).value=round(myarray(k,m),2), but the problem persists.
Can somebody be kind enough to help me please? As I said, I have a very tight deadline and I'm starting to get desperate.
Thank you very much!