Sparklines in Excel

How to insert sparklines in Excel? In this article, you will learn all about sparklines. Get some useful examples! Now I’ve created this post to be a follow-along lesson. You can download the Excel file that I use during the article.

Sparklines are in-cell Excel charts, and we are using these graphs to show variance or trends. We recommend using sparklines for data visualization purposes. It is woth to use it! You can save space, and that is important if you are working with a large data set.

Three types of Sparklines

  • Line
  • Column
  • Win-Loss

Take a quick look at the example below. You can easy to identify these sparkline types.

sparklines types overview

Let us see the most important things about sparklines:

  1. Sparklines are dynamic in-cell charts. If you update your data set, the chart will be reflected automatically. So, the tool is perfect if you want to create an Excel dashboard.
  2. The size of the main graph is connected to the source cell. What does this mean? If you increase the cell, sparklines will be greater. And vice versa.
  3. Sparklines are user-friendly graphs. Change the color of the main elements (high and low points) with a few clicks!

How to insert Sparklines in Excel

In this section you will learn how to insert a sparklines using a few steps. In the picture below you can see the final result:

how-to-insert-sparklines

1. Select the cell that you want to place the chart.

select the cell for the sparklines

2. Select the Insert tab.

3. In the Sparklines group, choose the Column option.

insert a column type sparklines

4. Choose the data that you want to use as a data range.

select the data range

5. Click OK, and the sparkline will appear in the cell N8.

how to insert sparklines

Use the same steps if you want to insert a ‘Win-loss’ or ‘Line’ sparkline. At first look, the chart is a little bit simple. No worry, there are some customization options! Try to select a single cell that contains sparklines. A new contextual tab will appear, and with its help, you can change the selected type.

sparklines design tools

How to edit the Sparkline’s data set?

Let us see how to edit the existing chart using the ‘Edit Data’ drop-down menu.

  1. Edit the location and data source for the selected sparkline group.
  2. Edit only the data source for the selected sparkline
edit data

Eliminating the gap: Hidden and Empty Cells

Now, we will explain what will happen when you have a missing data point in the series. Take a closer look at picture below:

missing data point hidden empty cells

In the example, the value for the year 2023 is missing. Our chart is broken and looks bad.

Okay, follow these steps below to fix the series:

  1. Click the source cell, in this case cell N8.
  2. Select the Sparkline tab and choose the ‘Hidden and Empty cells..’ option
hidden and empty cells

A new dialog box will appear. Select what you want to display:

show empty cells as gaps zero

You can choose how to want to show the empty cells:

  • Gaps
  • Zero
  • Connect the data point (in case of line type)
gaps zero connect empty line
  • The first example shows the gap on the line
  • The second case get a continuous line using zero
  • When you want to display a continuous line, use the third option

How to change the Sparkline type

In this section, you will learn how to change your chart type quickly. Select the cell first! After that locate the type group:

change chart type

With a single click, you can convert the default type to another type.

Highlight Data Points on the Chart

For better readability, it is important to place markers to highlight the key data points on the chart. You can apply color markers for the max and min points and negative data points too. Furthermore, you can highlight the first and last data points on the series.

In the example below we will show you how to apply colors to highlight the min and max data.

high point low point on the line

Under the Show section, you have four options:

  1. High and Low Point: Highlight the highest or lowest data point in the selected group.
  2. Toggle First and Last Point: You can highlight the first or last data point in the selected sparkline group.
  3. Negative Points: You can highlight the negative values on the selected series with a different color or marker.
  4. Markers: Apply markers for all data points on the line. Good to know that this marker is valid for only line!

Deleting the Sparklines

If you want to delete a cell that contains sparkline, you have to apply a little trick. Try to use the delete key; nothing will happen.

To delete the cell content, use these steps below:

  1. Select the given cell
  2. Click the Sparkline Tab
  3. Clear the cell content by clicking on the ‘Clear’ icon.
clear selected sparklines

Download the practice file!