Hi, I'm trying to find the correlation between 2 data subsets within a time series.

I only want correlation of 2 subsets within this series.

Here's the formula that I am trying to use but is not working: [=if(and(a2:a17311=j3,b2:b17311<17:00,b2:b17311>7:00),Correl(c2:c17311,g2:g17311),0). ]

As you can see, there is a problem with this. I don't know how to find the correlation ONLY between 2 subsets of the time series.

In this case, column A is the date & am matching this to j3 which is the date that I'm trying to filter out to get this & column B is the time; as I only want certain times of the day that this is correlated in.

I used this because of the sumif function where only a selected column or row should be added, should the given criteria be met but obviously it's not the same ;-)

Can you please help? Thanks