how to draw a trendline using two set of data?

P

PY

Dear All,
How to draw a trendline using two set of data (same x-value but different in
y-value)

thanks
Cheers
 
J

Jon Peltier

Do you want two trendlines, one for each data set? The Add Trendline dialog
(Chart menu > Add Trendline) has a listbox to allow selection of a series.

Do you want to combine the data into one series? You need to define a series
that contains all of the points. If your two separate series have these
series formulas:

=SERIES(Sheet1!$C$4,Sheet1!$B$5:$B$12,Sheet1!$C$5:$C$12,1)
=SERIES(Sheet1!$D$4,Sheet1!$B$5:$B$12,Sheet1!$D$5:$D$12,2)

you need to add a series with this formula:

=SERIES("Combined",(Sheet1!$B$5:$B$12,Sheet1!$B$5:$B$12),(Sheet1!$C$5:$C$12,Sheet1!$D$5:$D$12),3)

Note how you can define multiple area ranges by separating the areas with
commas and enclosing the combined range in parentheses.

You can simply select the plot area, then click in the formula bar, and type
or paste in a valid formula like this.

- Jon
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top