hi,
i've downloaded the file, try to apply but i've got a problem, here is screenshot :
i am using excel 2017 ( i don't know if its right version or not ). i am trying to using 2003 version that you've upload but its failed too, after i enabled macro, i think its crash or something like that.
here is what i've got with 2003 version
for some reason i deleted the declaration of the variable r2. dunno why it worked on my side because it really shouldnt have

anyways i think it should be fixed.
thank you for your patience!
File:
http://www.xup.in/dl,14148873/CALC.XLSM/greetings
sorry for late reply, i re-download the file, add my tradehistory with all content in the file and this is what i got :

it makes me confuse, what is wrong and i can not found that mistake. or my excel is not compatible with yours?