Smart Systems for Home

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

How to Make a Two Line Graph 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

To make a two-line graph in Excel, put your two data series in adjacent columns with a shared column of dates or categories, select the whole range including the headers, then go to Insert > Charts and click the Line chart icon. Excel plots both columns as separate lines on one chart with a legend. The rest of this guide covers getting the data laid out correctly, formatting the chart so the two lines are easy to tell apart, and fixing the problems that most often make a two-line chart look wrong.

What You'll Need

  • Excel for Windows, Mac, or Excel for the web. The ribbon labels below match the desktop versions; the web version has the same Insert > Charts group but a slightly reduced formatting pane.
  • Two sets of values measured on the same categories or dates, arranged in columns.
  • One column of labels (dates, months, or names) to use as the horizontal axis.

Menu and button labels can differ slightly by Excel version, platform, and region, so if a label you see is worded a little differently, look for the closest match.

Step-by-Step

  1. Lay out the data in three columns. Put your category labels in column A (for example Jan, Feb, Mar, or actual dates), series one in column B, and series two in column C. Give each column a header in row 1, such as Month, Sales, and Returns. Do not leave blank rows or merged cells inside the data range.
  2. Check that both series are numbers. If a column was pasted from another system, values may be stored as text and will plot as zero or not at all. Select the column, and if the values sit against the left edge of the cell instead of the right, convert them: select the range, then use Data > Text to Columns and click Finish, or multiply the range by 1 using Paste Special > Multiply.
  3. Select the whole range, headers included. Click cell A1 and drag to the bottom-right corner of your second series, so the selection covers all three columns and every data row.
  4. Insert the chart. Go to Insert > Charts and click the Line chart button, then choose the first option, which is a plain 2-D line chart. Excel places the chart on the sheet and draws one line per numeric column, with the labels along the horizontal axis and a legend naming each line.
  5. Verify both lines appear. Look at the legend: it should list both column headers. If only one line shows, right-click the chart and choose Select Data, then check that both series are listed under Legend Entries (Series). If one is missing, click Add and point the Series values box at the missing column.
  6. Set the category axis correctly. In the same Select Data dialog, the Horizontal (Category) Axis Labels box should point at your label column. If the axis shows 1, 2, 3 instead of your months, edit that box and reselect the label range. Click OK.
  7. Tell the two lines apart. Click a line once to select the series, then right-click and choose Format Data Series. On the fill and line options, set a distinct colour for each series and, if you like, a different dash type or a marker style. Markers help a lot when the two lines cross.
  8. Add axis titles and a chart title. Use the Chart Elements button (the plus sign at the top-right of the selected chart) to tick Axis Titles and Chart Title, then type meaningful text. Label the vertical axis with the unit, such as Dollars or Units.
  9. Handle very different scales. If one series runs in the hundreds and the other in single digits, the small line will look flat. Right-click the series with the larger values, choose Format Data Series, and turn on the Secondary Axis option. Excel then adds a second vertical axis on the right. Label both axes clearly so readers know which line belongs to which scale.
  10. Move and size the chart. Drag the chart by its border to reposition it, or drag a corner handle to resize. For a cleaner report, right-click the chart and choose Move Chart > New Sheet to give it a full worksheet of its own.

Common Mistakes

  • Selecting only the value columns. If you skip the label column, Excel invents its own 1, 2, 3 axis. Always include the labels in the selection.
  • Leaving headers out. Without headers, the legend reads Series1 and Series2, which tells the reader nothing.
  • Numbers stored as text. This is the most common reason a line sits flat at zero. Check the cell alignment and convert as described in step 2.
  • Picking a stacked line chart. The stacked option adds the two series together, so the top line is a total rather than the second series. Choose the plain 2-D line.
  • Adding a secondary axis without labelling it. Two scales on one chart are fine, but unlabelled they mislead.
  • Blank cells inside the range. Excel may break the line or drop to zero depending on the setting. Fill gaps or delete the empty rows before charting.

Tips

  • Use an Excel Table (Insert > Table) as your source. When you add a new month to the table, the chart picks it up automatically.
  • Keep the two lines to two colours only; more colours on a two-line chart add noise rather than clarity.
  • Sort your dates chronologically before charting. An unsorted date column produces a zigzag that looks like a data problem.
  • For a quick read, add data labels to the last point of each line only, rather than labelling every point.
  • If you will reuse the formatting, right-click the chart and choose Save as Template, then apply it to future charts.

Troubleshooting

The chart shows only one line. Open Select Data and confirm two entries exist under Legend Entries. Add the missing series manually and point its values at the correct column.

The line is flat along the bottom. The values are almost certainly text. Convert the column to numbers, then right-click the chart and choose Refresh Data if you are on the web version, or simply re-select the range on desktop.

The horizontal axis shows numbers instead of dates. Reselect the category labels in Select Data. For true dates, Excel may also treat the axis as a date axis; right-click the axis, choose Format Axis, and set the axis type to Text axis if you want every label shown evenly.

The lines overlap and you cannot see one. Apply different colours, dash styles, or markers, and consider the secondary axis if the scales differ.

The chart will not update after editing data. Check that the chart's source range still covers the edited rows. If you inserted rows above the range, extend the range in Select Data or convert the source to a Table.

Excel is slow or the chart looks broken after a large paste. Save your work, close and reopen the file, and remove any blank rows or duplicate headers from the source range before rebuilding the chart.

Frequently Asked Questions

Can I plot two lines with different vertical scales?

Yes. Format one series and turn on Secondary Axis. Both lines then share the chart but use separate scales, one on the left and one on the right.

How do I add a third line later?

Add the new column next to the existing ones, then right-click the chart, choose Select Data, click Add, and point the series values at the new column.

Why does my legend say Series1 and Series2?

The header row was not included in the selected range. Either reselect the range with headers or rename the entries in the Select Data dialog.

Can I make one line dashed and the other solid?

Yes. Select the line, open Format Data Series, and change the dash type under the line options. This is useful for black-and-white printing.

Does this work in Excel for the web?

Yes, the Insert > Charts line options and Select Data dialog are available there. Some advanced formatting, such as custom dash patterns, is more limited than on the desktop version.

How do I stop Excel treating my dates as a category axis?

Right-click the horizontal axis, choose Format Axis, and switch the axis type between Date axis and Text axis depending on whether you want evenly spaced dates or evenly spaced labels.