How to Use an Excel Trendline for Part of the Data – 2 Methods

This is an overview.

Overview of Excel trendline for Part of Data


Download Practice Workbook

Download the workbook here.


What is a Trendline in Excel?

A trendline is a straight or curved line that represents the overall trend of a set of data points in a chart.

Excel has different types of trendlines: linear, exponential, polynomial, logarithmic, power trendline, etc.


The dataset showcases the speed record of a vehicle.

Dataset to create a trendline for part of data in Excel


Method 1 – Using a Trendline for Part of the Data within the Full Chart

  • Select your dataset: B5:C12.
  • Go to the Insert tab >> Insert Scatter (X, Y) or Bubble Chart >> Scatter.

Create Scatter Plot from the Insert Tab

A scatter chart will be plotted.

To create a trendline for the first 6 points of the graph: B5:C10:

  • Select the chart.
  • Go to the Chart Design tab.
  • Click Select Data.

Click on Select Data from Chart Design tab

  • In Select Data Source, click Add.

Click on Add from the Select Data Source window

  • Set the Series name. Here, Acceleration.
  • Set Series X values as B5:B10.
  • Set Series Y values as C5:C10.
  • Click OK.
Note:
The worksheet name is Part of Data.

Inserting ranges for series X and Y values

  • Click OK.

Click on OK

  • The orange points represent the first 6 parts of the dataset and the blue points represent the rest of it.

Data points are polarized in the graph

  • To create a trendline for the orange points, select any orange point and click the plus (+) icon.
  • Check Trendline.

Mark trendline from the chart elements option

  • The trendline is created.

Trendline for part of data


Method 2 – Creating a Trendline for Previously Selected Data

  • Select B5:C10.
  • Go to the Insert tab.
  • Click Insert Scatter (X, Y) or Bubble Chart.
  • Select Scatter.

Select part of data then click on scatter from the Insert tab

A scatter chart will be created.

  • Select the chart.
  • Click the Plus (+) icon.
  • Check Trendline.

Mark trendline from the chart elements section

This is the output.

Trendline inserted for part of data

 


How to Add Multiple Trendlines in Excel

To add another trendline to the same chart, follow the steps described in the 1st method. The trendline displays orange points. Add a trendline for the blue points.

  • Select the chart.
  • Go to the Chart Design tab.
  • Click Select Data.

Select chart and click on Select data

  • Click Add.

Click on Add option from the Select Data Source window

  • Set the Series name. Here, Deceleration.
  • Set the Series X values as B11:B14.
  • Insert C11:C14 in the Series Y values.
  • Click OK.
Note:
The worksheet name is Multiple Trendlines.

Select range for series X and Y values

  • Click OK again.

Click on OK

  • You will see that the colors of the points changed from blue to ash.

 Colors of the remaining data points changed

  • Select any ash point.
  • Click the plus (+) icon.
  • Check Trendline.

Selecting ash colored data point,mark trendline from the chart elements

  • There are two trendlines in the graph:

Multiple trendlines added in the graph


How to Add a Trendline For Multiple Series

The dataset showcases the speed record of two vehicles.

Dataset of multiple series

  • Go to the Insert tab.
  • Click Insert Scatter (X, Y) or Bubble Chart.
  • Select Scatter.

Clicking on Scatter from the Insert tab

  • An empty page will be displayed.
  • Select it and go to the Chart Design tab.
  • Click Select Data.

Clicking on select data

  • Click Add.

Click on Add option

  • Set Series name as Vehicle A.
  • Select B6:B10 in the Series X values.
  • Select C6:C10 in the Series Y values.
  • Click OK.

Selecting ranges for series X and Y values

  • Click Add again.

Click on Add

  • Set the Series name as Vehicle B.
  • Set the Series X values as E6:E10.
  • Select F6:F10 in Series Y values.
  • Click OK.

Selecting ranges for series X and Y values

  • Click OK again.

Click on OK

  • The chart will be created. You can see blue and orange points.

Chart created with several data points

  • Select any blue point.
  • Click the plus (+) icon.
  • Check Trendline.

Selecting a blue point, mark trendline from the chart elements option

  • Select any orange point.
  • Click the plus (+) icon.
  • Check Trendline.

Selecting an orange point, mark Trendline

  • This is the final output:

Trendlines for multiple series


Frequently Asked Questions

1. Can I customize the trendline in Excel?
Yes, you can customize color, line style, type (line, exponential, polynomial, etc.), equation and R-squared value.

2. Can I remove or edit the trendline later?
Yes. To edit a trendline, select it on the chart, click, and use the Format Trendline choices to replace or remove it.

3. How can I interpret the trendline equation and R-squared value?
The trendline equation  can be used to forecast values that go beyond the data at hand. How well the trendline fits the data is determined by its R-squared value; a number near 1.0 indicates a good fit, while one closer to 0.0 indicates a bad fit.

 

Get FREE Advanced Excel Exercises with Solutions!
Raiyan Zaman Adrey
Raiyan Zaman Adrey

Raiyan Zaman Adrey, armed with a BSc in Civil Engineering from Bangladesh University of Engineering and Technology, efficiently combines engineering skills with a passion for Excel. In his role as an Excel & VBA Content Developer at ExcelDemy, he not only tackles complex issues but also demonstrates an enthusiastic mindset, efficiently managing critical situations with patience, showcasing his commitment to excellence. He is interested in C, C++, C#, JavaScript, Python, Microsoft Office, AutoCAD, Adobe Illustrator, Data Entry, and... Read Full Bio

We will be happy to hear your thoughts

Leave a reply

Advanced Excel Exercises with Solutions PDF

 

 

ExcelDemy
Logo