How to add a vertical line to the chart

This tip about how to add a vertical line in your chart. E.g., this will be useful to show data and highlight a current date.

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

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

Data in Excel 2007

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

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

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 ($C$1)
  • In the Series Y values box - constant value (100):
New Data Series in Excel 2007

    3.    Select new date series, under Chart Tools, on the Layout tab, in the Analysis group, choose the Error Bars and then select More Error Bars Options...:

More Error Bars Options Excel 2007

In the Format Error Bars dialog box, type parameters of the vertical line:

Format Error Bars in Excel 2007

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

Chart with vertical line in Excel 2007

Thank you for visiting OfficeToolTips

We are glad to help you in your work. However, you are using ad blocker and our efforts will not be rewarded.

Please consider disabling ad blocker before continuing the reading.