I'm trying to count the number of months it took in the past to hit a certain value (count the months from the right to the left).

Example:

Excel.png

I have hardcoded the values in yellow here, with the correct answers. May 2014 would be 6, because December 2013 through May 2014 (trailing 6 months) summed to 54%.

Hope I am explaining this correctly. Thank you!