Traderjoe56
New Member
- Joined
- Jun 22, 2011
- Messages
- 9
Hi everyone,
Thanks ahead of time for anyone that helps with this problem. basically I have a couple hundred of rows of countries, and data columns for years, with the final column calculating the average annual % change for preferably a 5 year span. The problem is, the data is spotty, and I need to change the formula manually for a number of countries. What I would like, is a macro/formula that can look for the first non zero year. Whatever that year is serves as an anchor. I then want the formula to go back five years, and check if that's non zero. if it is, I want it to run say the formula, (=(I21-E21)/E21/4) to basically calculate the average annual % change for five years. if it's zero, I want it to expand to the 6th year... and if that's zero, the 7th year... until it reaches the 8th year, and then I want it to snap back into the 4th year, 3rd year, and finally the 2nd year.... in other words, i'm trying to create something that can fill in the final three columns of what's in the picture.
Hope this makes sense, and again, thanks in advance for whatever help you can give....
Joe
Thanks ahead of time for anyone that helps with this problem. basically I have a couple hundred of rows of countries, and data columns for years, with the final column calculating the average annual % change for preferably a 5 year span. The problem is, the data is spotty, and I need to change the formula manually for a number of countries. What I would like, is a macro/formula that can look for the first non zero year. Whatever that year is serves as an anchor. I then want the formula to go back five years, and check if that's non zero. if it is, I want it to run say the formula, (=(I21-E21)/E21/4) to basically calculate the average annual % change for five years. if it's zero, I want it to expand to the 6th year... and if that's zero, the 7th year... until it reaches the 8th year, and then I want it to snap back into the 4th year, 3rd year, and finally the 2nd year.... in other words, i'm trying to create something that can fill in the final three columns of what's in the picture.
Hope this makes sense, and again, thanks in advance for whatever help you can give....
Joe