Dynamic cell references in formula

ben.southern

New member
Joined
Oct 19, 2018
Messages
1
Reaction score
0
Points
0
Excel Version(s)
Excel for Mac version 16.13
HI,

I am running correlation analysis for my company and I am having some trouble with a referencing problem. Basically I have big sets of formulas carefully tailored to thier assigned spots. But I need to be able to enact row changes in part of the formula on demand.

This is my formula:
=CORREL(Sheet3!$D$2:$D$5000,Sheet3!$AH$2:$AH$5000)

I need to be able to set the row references in BOLD to be what I want them to be. Basically so that I can make 1, 2 or 3 month offset in the correlation when I want to.

This is an ongoing project and every time a new data set up added I have to rebuild the whole matrix from scratch.

Is there any way to assign a reference within the formula instead of those numbers so that I can change the number in the reference cell and this will feed through to the reference within the formula.

Basically I would want to change to row values here to the number within cells A1 and A2.

Any ideas?

Regards
 
Try this:
=CORREL(Sheet3!$D$2:$D$5000,INDIRECT("Sheet3!$AH$" & A1 & ":$AH$" & A2))

(you didn't say A1 & A2 from which sheet!!)
 
Back
Top