How to Insert Another Line in Excel Graph
In this article
To insert another line in an Excel graph, you need to add a new data series to the chart's data source. This is most quickly done by right-clicking the chart and selecting Select Data, then clicking Add to define the new line's name and values. Adding multiple lines allows you to compare different data sets—such as sales figures for two different years—on a single set of axes.
What You'll Need
- An existing Excel workbook with a chart already created.
- The additional data you wish to plot, organized in cells (columns or rows) within the same worksheet or a linked sheet.
- The data should ideally be formatted in a table or a clean range with headers to make selection easier.
Step-by-Step
Depending on your version of Excel (Windows, macOS, or Web), menu labels may differ slightly, but the core logic remains the same.
- Prepare Your Data: Ensure the new data you want to add is placed in a column or row adjacent to your original data. For example, if Column A contains dates and Column B contains "Product A" sales, place "Product B" sales in Column C.
- Open the Select Data Window: Right-click anywhere in the blank area of your existing chart. From the context menu that appears, select Select Data.... This opens the Select Data Source dialog box.
- Add a New Series: In the Legend Entries (Series) section (usually the left-hand box), click the Add button.
- Name the New Line: A small "Edit Series" window will pop up. Click inside the Series name box, then click the cell in your spreadsheet that contains the header for your new data (e.g., the cell that says "Product B"). Alternatively, you can type the name manually.
- Select the Data Values: Click inside the Series values box. Delete any default text (like
={1}) that is already there. While the cursor is blinking in the box, use your mouse to highlight the range of cells containing the actual numbers for the new line. - Confirm the Selection: Click OK on the Edit Series window, and then click OK again on the Select Data Source window. Your new line will now appear on the graph.
- Adjust the Legend: If the new line is visible but you don't see the label, click the Chart Elements button (the green plus sign + on the top right of the chart in Windows) and check the box for Legend.
Common Mistakes
- Including Headers in Values: When selecting the "Series values," do not include the header cell. Only select the numeric data. Including the text header in the values range can cause the line to not plot correctly or result in an error.
- Mismatched Data Lengths: If your first line has 12 data points (e.g., January to December) but your second line only has 6, the second line will stop halfway across the chart. Ensure both data series correspond to the same X-axis intervals.
- Selecting the Wrong Chart Type: If you add data to a Column chart, Excel will add another set of bars. To make it a line, you must change the chart type to a Line chart or use a Combo chart.
- Hidden Rows/Columns: If the data you are adding is in a hidden row or column, Excel may not display the line by default. You can change this in the Select Data window under "Hidden and Empty Cells."
Tips
- Use a Combo Chart: If the new line uses a completely different scale (e.g., one line is "Total Revenue" in millions and the other is "Growth %" as a decimal), the growth line will look like a flat line at the bottom. To fix this, right-click the new line, select Change Series Chart Type, and check the Secondary Axis box for that specific series.
- Dynamic Ranges: Convert your data range into an official Excel Table (select data and press
Ctrl + T). When you add new rows to a Table, the graph will automatically update and extend the lines without you having to manually "Select Data" again. - Formatting for Clarity: Once the second line is added, right-click it and select Format Data Series. Here you can change the line color, thickness, or add "Markers" (dots) to each data point to make the line easier to follow.
Troubleshooting
If the line does not appear or looks incorrect, try these steps in order:
- Check for Non-Numeric Data: Ensure there are no text strings, spaces, or "N/A" errors within your numeric data range. Excel cannot plot text as a point on a line graph.
- Verify the X-Axis: In the Select Data window, check the Horizontal (Category) Axis Labels on the right side. If the new line isn't aligning with the dates/labels, click Edit and re-select the range of labels to ensure they match the length of your data series.
- Check the Scale: If the line is there but appears as a flat line at the very bottom, your new data values are likely much smaller than the original values. Use the "Secondary Axis" method mentioned in the Tips section.
- Refresh the Chart: Sometimes a simple click outside the chart and back in, or a save and reopen of the file, resolves rendering glitches.
Frequently Asked Questions
Can I add a line to a chart that is already a bar chart?
Yes. You can do this by adding the data as a new series and then right-clicking that specific series to select Change Series Chart Type. Set that specific series to "Line" while keeping the others as "Clustered Column."
How do I add a line from a different worksheet?
Follow the same "Select Data" steps. When the "Series values" box is active, simply click on the other worksheet tab and highlight the data range there. Excel will automatically include the sheet name in the cell reference.
Why is my new line showing as a series of dots instead of a connected line?
This usually happens if the data is recognized as individual points or if "Markers" are enabled without a "Line" style. Right-click the dots, go to Format Data Series, and ensure the line style is set to a solid line rather than "No line."
Is there a faster way to add a line than using the Select Data menu?
Yes. If your new data is in a column immediately next to the old data, you can often click the chart to reveal the colored data boxes in your spreadsheet, then click and drag the corner handle of the blue box to include the new column.
How do I remove one of the lines later?
Right-click the chart, choose Select Data, select the series you want to remove from the list on the left, and click Remove.