@ kasan...
Your code gave me the same result as manual calculations with formulas.
How did you achieve that ...