What you need to do is use "Defined Names" to create dynamic ranges and then refer to these ranges in your CORREL formula.
In my data, A2:A100 is date range, Col B is Set 1, Col C is set 2
Initial date is in E1, Closing date is in E2
My first defined name is "Set1"
=OFFSET(Sheet1!$A$2,MATCH(Sheet1!$E$1,Sheet1!$A$2:$A$100)-1,1,MATCH(Sheet1!$E$2,Sheet1!$A$2:$A$100)-MATCH(Sheet1!$E$1,Sheet1!$A$2:$A$100)+1)
If you are unfamiliar with the MATCH and OFFSET functions, post your questions and I'll explain.
The second name "Set2" is much simplier.
Then the correlation formula is
Does this work for you?
ChemistB
Bookmarks