I'm looking to track cell elements to do moving totals that will update automatically by adding in each new addition while dropping off the oldest element. These cell elements are text, not values, and they are in rows / row pairs. New elements are not uniformly added throughout the worksheet, meaning the timing can vary. The formula needs to update as soon as each element is added. There are column headings that are numbered (as an example: 1 through 150) that I thought perhaps could be used somehow as a counter or a way to identify the farthest column in an appropriate array/range and then count back to get the beginning of the array/range? I tried working with a variety of functions (MATCH, INDEX, OFFSET, etc.), but I am not familiar enough with them to know how to make them work or even if they would be workable or yield the appropriate results. I don't want to have to manually re-define an array over and over, for that defeats the purpose of automating this.
Here is an example of the basic layout:
1 2 3 4 5 6 7 8 9 10 11 12 15 16 17 18 ... ... 150 Total n/y Total both
n n n n n n n n n 9
y y y y y y y 7
16
The most recent (largest and farthest to the right) row heading number that is populated in either of the rows (n or y) below it is what I am interested in finding to use in a formula that would add, say the last 6 entries of n and the last 6 entries of y, separately going back from that point and inclusive. Thus the moving totals (Columns 1-6, 2-7, 3-8, 4-9, etc.). I thought to use the "Total both" column and find that number in the heading row to provide a cell reference and hence a column, then count backward from that column. So far that hasn't worked for me.
This just shouldn't be that difficult, but it is something I have never run across before. Any help with this would be GREATLY appreciated!!!
Bookmarks