Thank you for your answer and sorry if the post was not clear.
I tought a loop function would be easier to use because I was not able to find a good approximation of the function based on data.
If you have any other suggestion to achieve the same result we can use other solutions. I'm not forced to use VBA, was just an idea to solve this problem.
My idea was something like that
Code should be very simple, but again if you have some other solution we can try. The fact is that as you can see I don't know VBA so would like to implement this logic and the first think that came to my mind was VBA.
I will look at the links you gave me to see if they can help.
The function you provided could be use in my case ?
Bookmarks