Datasp, When I made the statement to include additional columns, I meant I may need to add other variables to my data, not just including more months and years. After I tested with the solution provided by BILLFISH, I realized that, as you said, the denominators vary. I need a fixed window-size, such as only looking back at the previous four years from the current year or year in question. So, 2015 needs to be compared to the average of 2014 to 2011, 2014 needs to be compared to 2013 to 2010, and so on. Yes, BILLFISH gave a solution to what I asked. It is my fault that I didn't clarify enough in writing that I want a moving average calculation, but only have the average calculate for the prior four years from a given year. I'm hoping based on the solutions I have been given that a line or two of code can be added or modified for them to work in the manner I intended. Thank you for following up and being patient with me on this.
... View more