I have a code that extracts the unique dates and sum the values corresponding to the dates .. No problem at the code
The code contains that line
Code: Select all
a(.Item(txt), 3) = Val(a(.Item(txt), 3)) + Val(a(i, 5))
I have manually used SUMIF to make sure of the results and most of the results were the same except two dates. There are a little bit difference in the result of summation between the code and the SUMIF
for example: the sumif result is 98091.3679999999
while the result of the code is 98091.368
I know the difference is a lit bit and no worth but I would like to know why the difference occurs
By the way in the code I tried using Application.SUM and application.WorksheetFunction.SUM but the same problem is still there. So the SUMIF is more accurate or what?!