Summary Question
I am trying to use LINEST to calculate the linear regression output for selected data points in a table. The selection of the data points is being determined by a conditional array. Here's an example of the formula:
LINEST(IF(D2:D10000=2,E2:E10000),IF(D2:D10000=2,E2:E10000))
It returns a #VALUE response.
This method works great for other functions, like STDEV.S(IF(D2:D10000=2,E2:E10000)) or AVERAGE(IF(D2:D10000=2,E2:E10000)), but not for LINEST.
Is this simply not possible for LINEST? Or do I need to consider other steps to make it work?
Additional Detail
The data set is hourly sums of metrics for an extended period of time. I need to compare the exact hour of the day for the entire time frame for one metric to the exact hour of the day for the entire time frame for another metric. Here's a screenshot of what the data basically looks like:
In this particular case, I highlighted just to show the potential values that should be included in the LINEST.
I am trying to use LINEST to calculate the linear regression output for selected data points in a table. The selection of the data points is being determined by a conditional array. Here's an example of the formula:
LINEST(IF(D2:D10000=2,E2:E10000),IF(D2:D10000=2,E2:E10000))
It returns a #VALUE response.
This method works great for other functions, like STDEV.S(IF(D2:D10000=2,E2:E10000)) or AVERAGE(IF(D2:D10000=2,E2:E10000)), but not for LINEST.
Is this simply not possible for LINEST? Or do I need to consider other steps to make it work?
Additional Detail
The data set is hourly sums of metrics for an extended period of time. I need to compare the exact hour of the day for the entire time frame for one metric to the exact hour of the day for the entire time frame for another metric. Here's a screenshot of what the data basically looks like:

In this particular case, I highlighted just to show the potential values that should be included in the LINEST.