How to add a vertical line to the chart

Excel 365 2016 2010 2007
This tip is about how to add a vertical line in your chart. E.g., this will be useful to show data and highlight a current date.
Chart with vertical line in Excel 2013

To add a vertical line to your line or scatter chart, do the following:

   1.   Add the date with current date to your data, for example:

Data in Excel 2013

   2.   Add a new data series to your chart, do one of the following:

  • On the Design tab, in the Data group, choose Select Data:
    Data in Excel 2013
  • Right-click in the chart area and choose Select Data... in the popup menu:
    popup in Excel 2013

In the Select Data Source dialog box, click the Add button and in the Edit Series dialog box, type:

  • In the Series X values box - the cell with current date ($D$4)
  • In the Series Y values box - constant value (1):
New Data Series in Excel 2013

   3.   If it is necessary, change data series:

  • Right-click in the new data series and choose Change Series Chart Type... in the popup menu:
    Change Series Chart Type in Excel 2013
  • In the Change Chart Type dialog box, choose the Scatter type:
    Change Series Chart Type in Excel 2013

   4.   On the Design tab, in the Chart Layouts group, click the Add Chart Element icon and choose Error Bars list:

Add Chart Element in Excel 2013

Excel propose several error bars, also you can use More Error Bars Options.... If necessary, you can fine-tune the error bar settings from the Format Error Bars task pane:

Format Error Bars Options in Excel 2013

If you change the date, the chart will be changed too:

Chart with vertical line in Excel 2013

You can then make any other adjustments to get the expected look.

Please, disable AdBlock and reload the page to continue

Today, 30% of our visitors use Ad-Block to block ads.We understand your pain with ads, but without ads, we won't be able to provide you with free content soon. If you need our content for work or study, please support our efforts and disable AdBlock for our site. As you will see, we have a lot of helpful information to share.