Hi, everyone! I have a strange issue and am hoping to find some guidance here. I have a workbook with a sheet that contains the total wages and taxes for each employee, as well as a sheet that shows how many hours the employee spent on different tasks. I wrote a macro to calculate a breakdown of the total wages and taxes by task. However, when I add the breakdown back up, the calculated total does not match the total from the wages/taxes sheet. I have included a screenshot that shows the breakdown as two columns, the left value is the wages value and the right value is the tax value and below the blue mark is first the calculated total and below is the true total. Notice that they disagree by 1/1000 of a penny. Not a big deal except I have hundreds of employees and in the end, my calculations are off by $0.20. Is there someway to apply a precision rule so that the user of the macro (I am writing this to make life easier for an accountant so I do not use the macro myself) can sum the column to get the correct total and not the imprecise total? Thank you for any and all advice you can provide! Please let me know if any more information is necessary.
Inkedvba_rounding_error_LI.jpg
The code looks like this:
![]()
Please Login or Register to view this content.
Bookmarks