Thanks for all of your help. I will try to understand the formula, somehow.

The formula are great. I would close this thread as solved.