I have a simple spreadsheet, where column A is a bunch of dates (ascending) and column B is a bunch of values. Finding the OLS slope is easy:
But I don’t want the slope of everything. I want to see the slope for each month. So if C3 is “3”, I’d want to do something like:
Which is wrong, but hopefully conveys what I’m trying to do. How do I actually do this?
You’ve got the right idea more or less. Try the following, but instead of just pressing enter to commit the value to the cell, press Control+Shift+Enter (CSE) which turns it into an array formula and makes it behave the way you’d like.