How to Insert Trendline in an Excel Cell (Create and Customization)

We have four-year data on the population of three big cities. We’ll use the information to plot trendlines for the population.

Easy Ways to Insert Trendline in Excel Cell


Method 1 – Using Sparklines to Insert a Trendline in an Excel Cell

Steps:

  • Make a table below the original data set.
  • In the table, add three extra cells in C10, C11, and C12 to show the trendline.

Easy Ways to Insert Trendline in Excel Cell

  • Select the data range from C5 to C8.

Easy Ways to Insert Trendline in Excel Cell

  • Go to the Insert tab of the ribbon.
  • Go to the Sparklines command from the Sparklines group.
  • Select the Line Sparkline option.

Easy Ways to Insert Trendline in Excel Cell

  • You’ll get a new dialogue box named Create Sparklines.
  • The Data Range type box should be already filled in.
  • Select the location of the trendline in the Location Range type box. For our example, we chose cell C10 as the location of the first trendline.
  • Press OK.

Easy Ways to Insert Trendline in Excel Cell

  • You will see the trendline in cell C10 for the yearly population of City A.

Easy Ways to Insert Trendline in Excel Cell

  • Repeat the steps to insert trendlines for the population of the other two cities as well.

Easy Ways to Insert Trendline in Excel Cell


Method 2 – Adding Column Bar Charts to Insert a Trendline in an Excel Cell

Steps:

  • Select the data range from B4 to E8.

Easy Ways to Insert Trendline in Excel Cell

  • Go to the Insert tab of the ribbon and select the Recommended Charts command.

Easy Ways to Insert Trendline in Excel Cell

  • A new box named Insert Chart will open.
  • Select the chart of your choice. We chose the Clustered Column chart like in the image below.

Easy Ways to Insert Trendline in Excel Cell

  • You’ll get a column chart. Name the chart as Yearly Population Trend.

Easy Ways to Insert Trendline in Excel Cell

  • To add the trendline to the chart, click on the chart.
  • You will see three icons right beside the chart.
  • Select the Chart Elements command.
  • Click on the Trendline option.

Easy Ways to Insert Trendline in Excel Cell

  • A new box named “Add Trendline” will appear. Select the first city and then press OK.

Easy Ways to Insert Trendline in Excel Cell

  • You will see the trendline for City A in the chart.

Easy Ways to Insert Trendline in Excel Cell

  • Repeat the process to start adding trendlines for other cities.

Easy Ways to Insert Trendline in Excel Cell

  • Select City B and then press OK.

Easy Ways to Insert Trendline in Excel Cell

  • You will see the trendline in the chart for the second city.

Easy Ways to Insert Trendline in Excel Cell

  • Repeat the above steps for the last city.

Easy Ways to Insert Trendline in Excel Cell


Customizing Trendlines

Case 1 – Altering Colors and Styles of Trendlines in an Excel Cell

Steps:

  • Go to the Sparkline tab of the ribbon, which you will only see after choosing the trendline.
  • Go to the Sparkline Color command.
  • Under the Theme Colors option, select any color of your choice.

Easy Ways to Insert Trendline in Excel Cell

  • You will see that the color of your trendline will change.

Sample Data Set

  • You can change the color of any trendline you want.

Sample Data Set

  • In the Sparkline tab, choose the Style command.
  • Choose a style of the sparkline you want.

Sample Data Set


Case 2 – Adding Data Points in Trendlines in an Excel Cell

Steps:

  • Select the sparkline.
  • Go to the Show group in the Sparkline tab of the ribbon.
  • Check the Markers command.

Sample Data Set

  • The trendline will show all the data points in it.

Sample Data Set

  • Repeat these steps for making data points in other trendlines.

Sample Data Set

Read More: How to Create Equation from Data Points in Excel


Case 3 – Modifying Trendlines after Adding Them from an Excel Column Bar Chart

Steps:

  • Double-click on any of the trendlines in the chart.
  • You will see a window pane named “Format Trendline” at the right of the chart.
  • Under the Line label, mark the Solid Line option.
  • Change the width of the chart in the Width box.
  • Change the Dash type of the trendline.

Sample Data Set

  • The sparkline will change according to the new criteria.

Sample Data Set

  • Follow the above steps again to change the trendlines in the other two bars.

Sample Data Set


Download the Practice Workbook

You can download the free Excel workbook from here and practice on your own.


Related Articles 


<< Go Back To Add a Trendline in Excel | Trendline in Excel | Excel Charts | Learn Excel

Get FREE Advanced Excel Exercises with Solutions!
Md. Araf Bin Jayed
Md. Araf Bin Jayed

I am Araf. I have completed my B.Sc in Industrial and Production Engineering from Ahsanullah University of Science and Technology. Currently I am working as an Excel & VBA Content Developer in Softeko. With proper guideline and aid of Softeko I want to be a flexible data analyst. With my acquired knowledge and hard work, I want to contribute to the overall growth of this organization.

We will be happy to hear your thoughts

Leave a reply

Advanced Excel Exercises with Solutions PDF

 

 

ExcelDemy
Logo