How to add a horizontal line to the chart

Excel 2016
Sometimes you need to add a horizontal line to your chart. E.g., this will be useful to show data with some goal line or limits:
Goal as horizontal line in Excel 365    Limits as horizontal line in Excel 365   

To add a horizontal line to your chart, do the following:

   1.   Add the cell or cells with the goal or limit (limits) to your data, for example:

Additional data for the chart in Excel 365

   2.   Add a new data series to your chart by doing one of the following:

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

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

  • In the Series name box - the name of this line (Goal),
  • In the Series values box - the cell with the goal ($C$16):
Edit Series in Excel 365

   3.   If it is necessary, change data series:

   3.1.   Right-click in the new data series and choose Change Series Chart Type... in the popup menu:

Change Series Chart Type in Excel 365

   3.2.   In the Change Chart Type dialog box, choose the Scatter type:

Change Chart Type in Excel 365

   3.3.   Repeat step 2 to change the data series:

In the Select Data Source dialog box, select the added data series and click the Edit button, then in the Edit Series dialog box:

  • In the Series X values box - add any cell from the horizontal (category) axis (for example, $B$8):
Series X values in Excel 365

You will see the correct data for the same horizontal (category) axis:

New data Series in Excel 365

   4.   Select the new data series, then do one of the following:

  • Click on the Chart Elements button, select the Error Bars list, then choose More Options...:
    Chart Elements - Error Bars in Excel 365
  • On the Chart Design tab, in the Chart Layouts group, click the Add Chart Element drop-down list:
    Add Chart Element button in Excel 365

    In the Add Chart Element drop-down list, choose the Error Bars list, then click More Error Bars Options...:

    More Error Bars Options in Excel 365

Excel proposes 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 pane:

More Error Bars Options in Excel 365

To specify the length of the error line, click on the Specify Value button, and type the appropriate value for negative and positive values. For this example:

Custom Error Bars in Excel 365

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

See also this tip in French: Comment ajouter une ligne horizontale au graphique.

If you have any questions or suggestions, please feel free to ask OfficeToolTips team.