Smart Systems for Home

Plain how-to guides for smart home, security and home Wi-Fi

How to Graph Multiple Lines in Excel

· 7 min read · Home Tech

In this article
  1. What You'll Need
  2. Step-by-Step
  3. Common Mistakes
  4. Tips
  5. Troubleshooting
  6. Frequently Asked Questions

Yes, you can graph more than one line in Excel by selecting multiple columns of data before inserting a chart. This allows you to compare trends, performance metrics, or any two variables side-by-side to see correlations or divergences. Before you begin, ensure your data is organized in a way that Excel can interpret, typically with headers in the first row and data in the rows below them.

What You'll Need

  • A computer with Microsoft Excel installed (Excel for Windows, Mac, or Office 365).
  • A dataset with at least two columns of numerical data. The first column should contain the category labels (like months or product names), and the subsequent columns should contain the values you want to plot.
  • A basic understanding of selecting ranges of cells with your mouse or keyboard.

Step-by-Step

  1. Select Your Data: Open your Excel workbook and navigate to the worksheet containing the data you wish to visualize. Click on the top-left cell of your data range. To select all relevant data, hold down the Shift key and click the bottom-right cell of the range. Alternatively, you can click and drag your mouse from the first data cell to the last one. If your data is in non-contiguous columns, hold the Ctrl key (Windows) or Command key (Mac) and click to select multiple separate ranges.
  2. Insert the Chart: With the data selected, go to the Insert tab located at the top of the Excel ribbon. In the Charts group, locate the Insert Line or Area Chart icon. It usually looks like a small line chart with a few lines on it.
  3. Choose a Chart Type: Click this icon to open a dropdown menu of available chart types. Select Line from the options. You will see several variations, such as Line, Stacked Line, and 100% Stacked Line. For most comparative tasks where you want to see the raw values of each line, the standard Line chart is the best choice. Click on it to insert the chart directly into your sheet.
  4. Verify the Series: Once the chart is inserted, examine it closely. The primary horizontal axis (bottom) should represent your category labels (e.g., Jan, Feb, Mar). The vertical axis (left) should represent the values. You should see multiple colored lines on the chart. Hover your mouse over the lines to see Excel’s tooltip, which will display the name of the series and the value for that specific point.
  5. Adjust the Chart Area (Optional): To make the chart easier to read, you can change the font size or add a title. Click on the chart title at the top (which says "Chart Title" by default) and type a descriptive name, such as "Monthly Sales vs. Expenses." To change the font size, click on the chart to activate the Chart Design and Format tabs that appear near the top. Use these tabs to modify the background color, add gridlines, or change the color of the individual lines.
  6. Modify Individual Lines: If you want to change the color of a specific line, click on that line in the chart to select it. A small dot will appear at each data point. Then, right-click and select Format Data Series. A pane will open on the right side of the screen. In this pane, you can change the line color, add markers (dots) to the data points, or change the line style (dashed or solid).

Common Mistakes

One of the most common errors users encounter is that Excel only plots one line instead of multiple lines. This almost always happens because the user did not select the second column of data before inserting the chart. If a column is not selected, Excel treats it as a label for the horizontal axis and ignores it when calculating the line data. To fix this, go back to the data source by right-clicking on the chart and selecting Select Data. In the dialog box, ensure that all the series you want to see are listed in the Legend Entries (Series) section. If a series is missing, click Add and select the correct range from your spreadsheet.

Another frequent issue is that the lines overlap so closely that it becomes impossible to distinguish them. This often occurs when the values in one dataset are much larger than the values in another. For example, if you are comparing the number of website visitors (in the thousands) with the number of sales (in the tens), the sales line will appear flat at the bottom of the chart. To resolve this, you can either change the scale of the vertical axis or use a secondary axis. To add a secondary axis, right-click on the line you want to separate and select Format Data Series. In the pane, check the box that says Primary Axis for one line and Secondary Axis for the other. This ensures both lines are scaled to fit the chart properly.

Tips

Always label your axes clearly. A chart without a title or axis labels is often confusing and difficult to interpret. The title should explain what the chart is showing, while the axis labels should tell you what the numbers represent (e.g., "Revenue in Dollars" vs. "Revenue in Thousands").

Use distinct colors for each line. If you are printing the chart in black and white, consider using line styles (solid, dashed, dotted) in addition to different colors to ensure the data remains distinguishable. You can do this by going to Format Data Series and selecting a different line style under the Line Style options.

Consider using markers. If your data points are far apart, adding markers (dots) to the lines makes it much easier to read the exact value at any given point. To add markers, right-click on the line, select Format Data Series, and check the Marker Options box. You can then choose the style and size of the marker.

Troubleshooting

If your chart is not updating automatically when you change a number in your data, it is likely because the chart is not linked to the source data. This can happen if you copy and paste data into the chart manually instead of using the Select Data source option. To fix this, right-click on the chart and select Choose Data. In the dialog box, click the Switch Row/Column button if your data is oriented sideways, or manually adjust the ranges in the Chart data range field to ensure they match your current spreadsheet layout.

If you find that the lines on your chart are not appearing in the order you expect, Excel usually orders them alphabetically by series name. If you want a specific line to be on top, you can change the order by right-clicking the chart and selecting Choose Data. In the Legend Entries (Series) section, select a series and use the Move Up or Move Down arrows to rearrange them.

Frequently Asked Questions

Why are the lines the same color?

By default, Excel assigns a new color to each line. If your lines appear to be the same color, it is likely because Excel has cycled through its built-in color palette and reused a color for the second series. You can easily fix this by right-clicking on the line, selecting Format Data Series, and choosing a new color from the color palette.

How do I add a third line to an existing chart?

To add a third line to an existing chart, you must first add the third column of data to your spreadsheet. Then, click on the chart to select it. Go to the Design tab and click the Select Data button. In the dialog box, click Add, name the series, and select the range for the third column of data. Click OK to update the chart.

Can I graph lines with different scales?

Yes, you can graph lines with different scales by using a secondary vertical axis. Right-click on the line you want to attach to a secondary axis, select Format Data Series, and check the Secondary Axis box. This will add a second vertical axis on the right side of the chart, allowing the two lines to be scaled independently.

Why does my chart show a blank line?

A blank line usually indicates that Excel is trying to plot a series that contains only non-numeric text or empty cells. Check the data source by right-clicking on the chart and selecting Select Data. Ensure that the range selected for that series contains only numbers, and that there are no stray spaces or text labels in the cells.

How do I remove the legend?

To remove the legend, click on the chart to activate the Design and Format tabs. On the Design tab, look for the Chart Layouts group. You can choose a layout that does not include a legend, or you can go to the Layout tab and click the Legend button to select None from the dropdown menu.