To create a line chart from two data sets in Excel for Microsoft 365 on Windows, arrange the shared time points or categories in the first column and each data set in its own adjacent column, select the full table, then choose Insert > Insert Line or Area Chart > 2-D Line. Excel plots the two value columns as separate lines; add headers first so the legend identifies each series.
Arrange the data so Excel can read it
A clear table is the foundation of a useful chart. Put one category or date in each row, and put each set of values in a separate column. Include a descriptive header at the top of every column. For example:
- Column A: Month
- Column B: Website visits
- Column C: Online orders
Rows below the headers might list January, February, and March, with a visits value and an orders value on each row. Excel uses the first column for the horizontal category axis and creates one line for each value column. The headers become the series names shown in the legend. If the data sets use different units or scales, the chart can still be created, but the visual comparison may need extra care.
Keep the rows in the order you want them displayed. For dates, use actual Excel date values rather than text that merely looks like a date; Excel can then treat the horizontal axis as dates when appropriate. Avoid merged cells, blank header cells, and extra totals within the selected range. A total at the bottom may be interpreted as another plotted point and distort the line.
Create the chart from adjacent columns
For a contiguous table, select the headers and all the data, including the category column. In the example above, that means selecting the range containing Month, Website visits, and Online orders. Then follow these steps:
- Open the Insert tab on the ribbon.
- Choose Insert Line or Area Chart in the Charts group.
- Under 2-D Line, select Line. Choose Line with Markers if you want a visible point at each observation.
- Review the result. The horizontal axis should show the categories, and the legend should list both column headers.
Excel may place the new chart over the worksheet. Drag it to move it, or use the corner handles to resize it. If the chart shows months as lines and the two measures as categories—or otherwise seems reversed—select the chart and choose Chart Design > Switch Row/Column. That command changes how Excel interprets the rows and columns; it does not change the worksheet data.
When the table is formatted as an Excel table, new rows added directly below it are generally included in the table and its chart range. This can make a chart easier to maintain as monthly results arrive. To format a range as a table, select it and use Insert > Table, confirming that the table has headers if the header row is included.
Use data sets that are not next to each other
If the two value columns are separated by unrelated data, it is usually simplest to create a chart from one series and then add the other. Select the category column and the first series, insert a line chart, and use the chart’s data controls to include the second series.
Select the chart, then choose Chart Design > Select Data. In the Select Data Source dialog, use Add under Legend Entries (Series) to define the second series. Set the series name to the cell containing its header, and set Series values to the cells containing its numbers. Check the horizontal axis labels in the same dialog so they refer to the intended category cells. Cell references can be selected directly in the worksheet while the dialog is open.
For nonadjacent ranges, Windows users can also hold Ctrl while selecting separate ranges before inserting the chart, but this method can be awkward and may not produce the desired series structure. On a Mac, use Command instead of Ctrl for selecting separate ranges. The Select Data Source dialog is often more predictable, especially when the category labels and value columns are separated or when the chart has already been created.
Choose the right line-chart type
A standard 2-D Line chart is a good default when the horizontal axis represents ordered categories, such as months, product stages, or survey groups. It connects each series’ values in the order of the rows. The Line with Markers option adds symbols at the observations, which helps readers see the individual data points when there are only a few.
A line chart treats the horizontal positions primarily as categories. If the x-values are numerical measurements and the spacing between them matters—for example, readings taken at 1, 2, and 10 seconds—an XY (Scatter) chart may be more suitable. A scatter chart positions points according to numerical x-values, while a line chart spaces categories evenly. You can choose a scatter chart from Insert > Insert Scatter (X, Y) or Bubble Chart. Some scatter-chart subtypes connect points with lines.
Do not choose a 3-D line chart simply for decoration. Three-dimensional effects can make comparisons harder to read. For most reports, a flat 2-D line chart with a clear title and restrained colors communicates trends more directly.
Make the two series easy to compare
Click the chart to open the Chart Design and Format tabs. Use Chart Design > Add Chart Element to add or manage a chart title, axis titles, legend, and gridlines. A useful title says what is being measured and, where relevant, the period—for example, “Monthly Website Visits and Orders.” Axis titles can clarify units, such as visits or orders, rather than leaving readers to infer what the numbers mean.
Keep the legend visible when the lines are not clearly labeled elsewhere. If the chart is small, markers or distinct line colors can help distinguish the series. To format an individual line, click it and use the Format Data Series options. Avoid relying on color alone if the chart may be printed in grayscale; marker shapes or line styles can provide another visual cue.
Check the vertical axis before drawing conclusions. Excel commonly chooses a scale that fits the values, and a vertical axis that does not start at zero can make small changes look more dramatic. A zero baseline is not always necessary for a line chart, especially when the purpose is to show variation over time, but the chosen scale should not mislead. Right-click the vertical axis and choose Format Axis to review or adjust its bounds. Describe an intentional nonzero baseline when readers might otherwise misinterpret the size of a change.
Handle dates, gaps, and mismatched observations
For a time series, place dates in one column and use a shared date row for both series. A line chart compares values at matching row positions, so the first value in one series is paired visually with the first category label, the second with the second, and so on. If one data set is recorded on different dates, do not simply place its values beside the other series without checking the date alignment. A value recorded on the 10th could otherwise appear under the 1st or under an unrelated category.
When dates differ, create a combined date list and align each series to the correct dates, leaving a blank where an observation is unavailable. Decide whether connecting across a missing observation makes sense for the story the chart tells. Select the chart and choose Chart Design > Select Data, then use Hidden and Empty Cells in the dialog to review how empty cells are displayed. Depending on the selected setting, gaps may appear as empty spaces or Excel may connect points across them. A blank is not the same as a measured zero: entering zero tells the chart that the value really was zero.
Excel may display a date axis with spacing based on calendar time rather than treating every date as an equally spaced label. If that is not the intended presentation, review the axis options by right-clicking the horizontal axis and choosing Format Axis. The available settings depend on the chart and the data Excel recognizes. If dates are treated as text, check that the cells contain valid date values and are formatted consistently.
Fix common chart problems
If only one line appears, first check the selected range and the series list in Chart Design > Select Data. The second column may not have been included, or Excel may have interpreted it as category labels. Add it as a series or correct the range. Also look for numbers stored as text: values aligned like text or imported with unexpected symbols may not plot as numeric measurements. Correct the source cells before changing the chart.
- The legend says Series 1 and Series 2: Add or correct the header cells, then check the series names in Select Data.
- The horizontal axis shows 1, 2, 3 instead of labels: In Select Data, edit Horizontal (Category) Axis Labels and select the category cells.
- The lines look like one series: Check whether the values are identical or very close, whether one series is hidden behind another, and whether the vertical scale makes the difference visible.
- Unexpected spikes appear: Inspect the source range for a total row, an accidental zero, a misplaced value, or an incorrectly included column.
- New rows do not appear: Check the chart’s data range. If the source is an Excel table, confirm the new records were added within that table.
When editing the source data, the chart usually updates automatically if the changed cells are part of its data range. If not, select the chart and open Chart Design > Select Data to revise the range. This is also a useful way to verify exactly which cells the chart is using.
When the two scales are very different
Suppose website visits are usually in the thousands while conversion rate is between zero and one percent. On a shared vertical axis, the smaller values may look almost flat. One option is to chart comparable measures on separate charts. This preserves a straightforward scale for each measure and can make the relationship easier to explain.
Another option is a secondary vertical axis. Select the series that needs a different scale, open Format Data Series, and choose Secondary Axis if that option is available for the chart. The second axis can make both lines visible, but it also changes how their heights appear. Two lines crossing on a dual-axis chart does not necessarily mean the underlying measures are equal; they use different scales. Label both axes with units and explain the scaling when the chart is used in a report. A secondary axis is not a way to make two quantities directly comparable.
Excel on Mac and Excel for the web
The basic process is similar in Excel for Microsoft 365 on Mac: arrange the data in columns, select it, and use the Insert tab’s chart options to insert a 2-D line chart. Ribbon layout and dialog placement can vary somewhat by platform or window size. For selecting multiple nonadjacent ranges, use Command rather than Windows Ctrl. Many chart-editing tasks, including changing a chart’s data source, are also available on Mac.
Excel for the web supports creating and editing common charts, although some advanced formatting controls and dialog options may differ from the Windows desktop app. If a particular axis or empty-cell setting is not available in the browser interface, open the workbook in the desktop version of Excel to access the fuller set of chart controls. The workbook’s chart remains part of the file when opened in another supported Excel version, but advanced formatting may not be equally convenient to edit everywhere.
Frequently Asked Questions
Can I put two data sets on one line chart in Excel?
Yes. Put the two sets of values in separate columns beside a shared category or date column, select the table, and insert a 2-D Line chart. Excel plots each value column as a separate series.
How do I add a second line to an existing Excel chart?
Select the chart and choose Chart Design > Select Data. Choose Add under Legend Entries (Series), then provide the second series’ header cell and value range. Confirm that the horizontal axis labels point to the intended categories or dates.
Can the two lines use different vertical scales?
Yes. You can place one series on a secondary axis through its Format Data Series options. Because the axes have different scales, label both clearly and avoid implying that the line heights are directly comparable.
Why does Excel show my dates as numbers or categories?
Excel may be reading the date cells as text, or it may be using a category axis. Check that the source cells contain valid date values, then review the horizontal axis options. The best axis behavior also depends on whether the chart is a Line or an XY (Scatter) chart.
Should I use a line chart or a scatter chart?
Use a line chart when the horizontal values are ordered categories or evenly spaced time periods. Use an XY (Scatter) chart when the x-values are numerical and their actual spacing matters, such as measurements taken at irregular intervals.
A final check before sharing
Before sending or publishing the chart, verify that both series use the correct rows, the dates line up, and the legend names match the headers. Check whether missing values are shown as gaps or connected lines, and confirm that any secondary axis is clearly labeled. A simple, accurate chart makes the comparison visible without asking readers to guess what a line, scale, or blank cell represents.
Related
- Create One Named Range from Multiple Cell Ranges in Excel
- Kuta Scatter Plot Worksheet: How to Find and Use One
- Set Print Area in Excel: Steps, Pages, and Fixes
Try it: the Percentage Formula Generator: percent of, percent change, increase and decrease, with the formula.
More in Charts & pivot tables
- Excel Gantt Charts: What’s Built In and How to Make OneExcel does not include a dedicated Gantt chart type, but you can make a Gantt chart with its…
- Pivot Chart vs Pivot Table: Differences and Best UsesA PivotTable organizes and summarizes source data into a changeable grid; a PivotChart turns that summary into a…
- Excel Chart Skip Blank Data? Control Gaps and ZerosYes. In Excel for Microsoft 365, a chart can show blank cells as gaps, treat them as zero,…
- Does Google Sheets Have Pivot Tables? How to Use ThemYes. Google Sheets has pivot tables, which let you summarize and reorganize rows of data without changing the…
- Excel Time Charts: Plotting Dates, Times, and TrendsTo make an Excel time chart, put each date or time in one column and its measurement in…
- Excel Bar Chart in Descending Order: Sort It CorrectlyTo put an Excel bar chart in descending order, sort the chart’s source data from largest to smallest:…
Sources: Function behaviour and menu paths: Microsoft Support documentation for Excel. Method & sources
Spotted an error in this guide? Let us know.