To add a line to an Excel chart, select the chart, choose Chart Design > Select Data > Add, then enter the new series name and its cell range. If you mean a trendline or a line drawn on top of the chart, use a trendline or a shape instead; those options work differently from adding a data series.
Choose the kind of line you need
People use “add a line” to mean several things in Excel. Picking the right method matters because some lines represent data and update when the worksheet changes, while others are annotations or statistical summaries.
- A data series: Adds another set of worksheet values to the chart. For example, you can show monthly sales and a monthly target together.
- A trendline: Adds a calculated line that summarizes the pattern in an existing data series. It is not a second set of monthly observations.
- A drawn line: Places a visual mark over the chart. It can highlight a level or connect points visually, but it is not linked to worksheet values.
- A line chart: Changes the chart type so one or more series appear as lines. This is useful when the data series already exists but is shown as columns or another chart type.
For a target that changes by month, add a data series. For a constant target, a helper series with the same value repeated across the categories is usually the clearest data-based option. For a fitted pattern, use a trendline. Use a shape only when you need a simple visual annotation.
Add a data series to an existing chart
These steps apply to Excel for Microsoft 365 on Windows. First, place the new series in the worksheet, ideally with its label in a header cell and one value for each chart category. For example, if the chart has January through April, the added series should also have four corresponding values.
- Select the chart. The contextual Chart Design tab appears on the ribbon.
- Choose Chart Design > Select Data. Excel opens the Select Data Source dialog.
- Under Legend Entries (Series), choose Add.
- In the Edit Series dialog, select the cell containing the series name, or type a name. Then select the cells containing the series values. Do not include the header cell in the values range.
- Choose OK, then OK again to close the data source dialog.
The new series is added using a chart type and formatting that Excel chooses. Depending on the chart, it may appear as another column, a line, or another mark. If it does not appear as a line, change that series’ chart type as described below. Check the legend and the plotted values to make sure Excel assigned the correct range.
If the series is already in the chart’s source range, you may not need to add it separately. Select the chart and inspect the highlighted source range on the sheet; extending that range to include the extra column or row can include the data. The Select Data dialog is often more precise, especially when the new data is not adjacent to the existing range.
Make the new series a line
After adding a series, you can change its chart type without changing the types of the other series. This is useful for combination charts—for example, columns for monthly sales and a line for a target or rate.
- Select the chart and choose Chart Design > Change Chart Type.
- In the chart-type dialog, choose Combo if it is available for the selected chart.
- Find the new series in the list and set its chart type to Line.
- If the series has a very different scale from the other data, consider selecting its Secondary Axis option. Use this carefully, since separate axes can make visual comparisons misleading.
- Choose OK, then review the result, including the axis labels and legend.
Excel may show a suggested combo configuration, but you can change the type for each series in the dialog. If Combo is unavailable or the choices differ, the options depend on the chart type and series. You can also select the specific series in the chart, right-click it, choose Change Series Chart Type when that command is available, and set the series to Line.
Build a horizontal target or reference line
A horizontal goal line is a frequent reason to add a line to a chart. The reliable approach is to add a helper series to the worksheet and chart it as a line. Suppose the chart has four categories, January through April, and the target is 100 units for every month. Add a column named Target beside the data and enter 100 for each of the four months. Add that Target column to the chart using Chart Design > Select Data > Add, then set the Target series to Line.
Repeating the target value across all categories makes the line respond to chart scaling and stay connected to the data. If the target changes, update the helper cells and the line follows. For a target that varies by month, enter the appropriate target for each category instead of repeating 100. The categories and values must align: the January target should occupy the position corresponding to January, not a different month.
For a numeric X-Y scatter chart, a horizontal reference line may require a different arrangement. Scatter charts use numeric X and Y values rather than treating the horizontal axis as a list of categories. Add a separate series with suitable X coordinates and the same Y value at both ends, then format that series as a line. Choose endpoints that span the part of the X-axis you want the reference line to cover.
Add a trendline to show a pattern
A trendline summarizes an existing data series; it does not add another row of actual measurements. Select the chart, select the data series whose pattern you want to summarize, and choose Chart Design > Add Chart Element > Trendline. Choose a trendline type from the available options. The available types depend on the chart and data; common choices include linear, exponential, logarithmic, polynomial, power, and moving average.
A linear trendline can help communicate an overall upward or downward direction, while a moving average can smooth short-term variation. Neither should be treated as a guarantee about future values. A trendline is only as useful as the data and the model behind it. For example, a straight line may be a poor summary of seasonal sales that rise and fall every year. You can use the trendline options to show its equation or R-squared value on the chart, but those statistics do not by themselves prove that the chosen model is appropriate.
If the Trendline command is unavailable, check that you selected a supported data series rather than the chart area, an axis, or the legend. Some chart types and series do not support trendlines. A trendline also cannot replace a target series when you need to compare actual values with a specific goal.
Draw a line that is only an annotation
For a one-off visual marker, select the chart and use Insert > Shapes, then choose a line shape and draw it over the chart. With the chart selected before inserting the shape, Excel can associate the object with the chart area, but it remains a drawing rather than a plotted data series. You can adjust its color, weight, and position with the shape-formatting controls.
A drawn line does not automatically move to the correct value if you edit the chart’s data, change the axis scale, resize the plot area, or add categories. It may be adequate for a presentation annotation, but it is a fragile way to show a threshold that should remain accurate. For a line that needs to stay at a particular value, use a helper series instead.
Check the data, axes, and formatting
When a new line looks wrong, the issue is often the source range or scale rather than the line style. Use the following checks before changing colors or rebuilding the chart:
- Confirm the category order. Make sure the new values align with the chart’s categories and appear in the intended order.
- Check the series range. The values selection should contain data cells, not the header or unrelated blank cells. A mistaken header selection can produce an unexpected legend entry.
- Compare scales. A series measured in percentages can look almost flat beside values in thousands. A secondary axis may make both series visible, but label it clearly and explain the units.
- Review missing or text values. Text, blanks, and errors may be plotted differently from numeric values. Check Chart Design > Select Data > Hidden and Empty Cells for the chart’s handling of empty cells.
- Make the line distinguishable. Select the line and use the formatting options to adjust its color, width, or markers. Do not rely on color alone if the chart must be easy to read in grayscale.
On a line chart, markers can clarify individual observations, especially when there are only a few categories. With many closely spaced observations, markers can clutter the display. If the line crosses a column series, consider whether the combo chart communicates the relationship clearly instead of assuming that combining chart types will make every comparison easier.
Excel for Mac and Excel for the web
In Excel for Mac, the chart workflow is similar: select the chart and look for the contextual Chart Design tab, then use Select Data to add a series. Ribbon names and dialog details can vary somewhat by release. The Windows keyboard shortcut Ctrl+1 opens the Format pane for a selected chart element; on Mac, use Command+1.
Excel for the web can create and edit charts, but the available chart-editing controls may differ from the desktop app, and some advanced options may not be available in a particular browser version. If you cannot find Select Data, Combo, or a needed series-formatting control, open the workbook in the desktop Excel app and make the change there. After editing, confirm the chart still looks right in the environment where it will be viewed.
Frequently Asked Questions
How do I add a line to a bar chart in Excel?
Select the chart, add the new data through Chart Design > Select Data > Add, then choose Chart Design > Change Chart Type and set that series to Line in the Combo options. A bar chart may need to be changed to a column-and-line combo if the desired layout is not offered.
How do I add a straight horizontal line at a target value?
Add a helper series with the target value repeated for each chart category, add it as a series, and set its chart type to Line. This keeps the reference tied to the data and chart scale.
Is a trendline the same as adding a line series?
No. A trendline summarizes an existing series, while a line series plots its own worksheet values. Use a trendline to show a fitted pattern and a separate series to show targets or additional observations.
Why is my added line flat or missing?
Check that the selected range contains the intended numeric values and matches the chart categories. A different scale can make the line appear flat; a wrong or empty range can make it disappear. A secondary axis may help with different units, but should be clearly labeled.
Can I draw a line across an Excel chart?
Yes. Select the chart, choose Insert > Shapes, and draw a line over it. It is a visual annotation, not a data-linked reference, so use a helper series if the line must track a value as the chart changes.
Can I add a line to a chart without changing the source data?
You can draw a shape or add a trendline without creating a new worksheet series. For a data-linked target or additional observations, however, you need values somewhere in the workbook so Excel can plot them.
Related
- Copy Excel Formulas to Google Sheets Without Errors
- How to Find a Circular Reference in Excel Step by Step
- How to Stop Solver in Excel Without Losing Your Work
Try it: the Percentage Formula Generator: percent of, percent change, increase and decrease, with the formula.
More in Charts & pivot tables
- Excel Pivot Chart Tutorial: Create and Customize ChartsTo create a PivotChart in Excel for Microsoft 365 on Windows, select a clean data range or Excel…
- Combo Charts in Sigma: How They Work and When to Use ThemYes. Sigma supports combo charts, which combine visual forms such as bars and lines in one chart so…
- Combo Chart in Excel: How to Create and Use OneTo make a combo chart in Excel for Microsoft 365 on Windows, select your data, choose Insert >…
- Monthly Excel Gantt Chart: Build a Clear Project TimelineA monthly Excel Gantt chart shows when tasks begin and end across a calendar, with colored cells marking…
- Excel Line Chart Data Range: How to Set ItIn Excel for Microsoft 365 on Windows, select the cells you want to chart—including the category labels and…
- 3D Pie Chart in Excel: How to Create and Format ItTo create a 3-D pie chart in Excel for Microsoft 365 on Windows, select a two-column list of…
Sources: Function behaviour and menu paths: Microsoft Support documentation for Excel. Method & sources
Spotted an error in this guide? Let us know.