I am trying to simulate a filter/regulation in Excel.
For that I would like to be able to specify an averaging length/time as a parameter. I.e. be able to average from a specified cell to a cell a specified number of cells further up the collumn (back in time).
Something like =average(A[row]:A[row-n]) where n is a specified but changeble number taken from some cell in the sheet and the the bracets [] simply are used to indicate the complete wanted row indexes for the averaging of collumn A.
I.e. In case of a fixed, never to be changed n=30, I could instead have written "=average(A100:A70)" for cell B100, followed by "=average(A101:A71)" for cell B101
Maybe using INDEX function is the key to this indirect indexing, but so far I have not figured out how to use it indirectly.
Any ideas?
For that I would like to be able to specify an averaging length/time as a parameter. I.e. be able to average from a specified cell to a cell a specified number of cells further up the collumn (back in time).
Something like =average(A[row]:A[row-n]) where n is a specified but changeble number taken from some cell in the sheet and the the bracets [] simply are used to indicate the complete wanted row indexes for the averaging of collumn A.
I.e. In case of a fixed, never to be changed n=30, I could instead have written "=average(A100:A70)" for cell B100, followed by "=average(A101:A71)" for cell B101
Maybe using INDEX function is the key to this indirect indexing, but so far I have not figured out how to use it indirectly.
Any ideas?