I have a given number n
of rows that should be multiplied with a factor x
to reference a cell above the current cell.
n
is a fixed number
x
is given in another cell and can be changed.
How can I achieve this without using volatile functions like INDIRECT or OFFSET (this has to be done a few dozen times)?
Example:
I have numbers in 2 blocks of 26 rows each. In cell C2
is the factor that defines the number of blocks to go up, so 1 to get to A27
, 2 to get to A1
). To clarify, C3
shows the height of my blocks, this number does not need to be a reference, it can be given as a number in my formula. I imagine it would like this:
Looking at the simplified example one might wonder, why a simple IF formula is not sufficient, but the number of block may vary a lot (probably [1,10]), so referencing fixed cells is not working for me.
I am using Excel 2016. If possible, I want to achieve this using formulas. If not, an approach with VBA would be acceptable.
I am not sure if it is possible to reference to a cell above the active cell. INDIRECT looked somewhat promising but I could find out a way to somehow multiply the amount of cells to go up and being a volatile function it is unpractical for my needs.
I think I would need to be able to input something like A53-26*x, is there a way to do maths with row numbers in a reference?
I have found these posts, that I think do not solve my problem: