Possible Duplicate:
Is there a function i can use to get the equation for the trendline?
i know you can find it if you do a plot graph and enable trendline equation, i was wondering if there’s a way i can use a formula to derive it. i have thousands of data sets and graphing each one of those is just not an option.
Use the
LINESTfunction, however, you need to enter it as an array formula to get both the slope and y-intercept. See Example 1 – slope and y intercept here