![]() |
![]() |
|
|||||||
| Excel Questions All Excel/VBA questions - formulas, macros, pivot tables, general help, etc. Please post to this forum in English only. |
![]() |
|
|
Thread Tools | Display Modes |
|
|
#1 |
|
New Member
Join Date: Mar 2002
Posts: 29
|
how do I use the LINEST funciton to plot a line of best fit on a graph???
thanks -Curator |
|
|
|
|
|
#2 |
|
Guest
Posts: n/a
|
There's a way without using Linest:
select the series in the graph and then select Chart - Add trendline. If you want to use Linest nevertheless, proceed as follows. Select two adjacent cells (beside each other) and type the formula =LINEST(B2:B20;A2:A20) (assuming your x values are in A2:A20 and your y values are in B2:B20). Enter the formula with Ctrl-Shift-Enter and not by just pressing enter (this is a special formula called CSE formula or array formula). Next, assuming the the LINEST results are in D1 and E1, put the following formula in C2: =A2*$D$1+$E$1 and copy it down along the values in column B. Now add this series to your chart with Chart - Add data. Marc |
|
|
|
#3 |
|
New Member
Join Date: Mar 2002
Posts: 29
|
Wow, thanks guys now I feel stupid
thanks -Curator |
|
|
|
![]() |
| Bookmarks |
| Thread Tools | |
| Display Modes | |
|
|