To choose X and Y data for an Excel chart, select your data range (or leave any cell inside it selected), go to Insert, pick a chart type that supports two axes such as Scatter or Line, then open Chart Design > Select Data to set which series are plotted and to edit each series so the X values column is assigned to the horizontal axis and the Y values column to the vertical one. The labels can differ slightly by Excel version, platform and region, but the Select Data dialog is the same concept everywhere.

Getting this right matters because Excel guesses. Left to its own devices, it often treats your first column as categories and ignores that you meant it as a numeric X axis, which produces a chart that looks plausible but is wrong. This guide shows how to take control, plus what to do when the chart refuses to cooperate.

What You'll Need

  • Excel on Windows, Mac, the web or a phone or tablet, with your data already entered.
  • Two columns of numbers for a true X/Y chart: one column of X values and one column of Y values, with a header row if you want the series to be named automatically.
  • Clean data: no blank rows in the middle, no text mixed into the numeric columns, and numbers stored as numbers rather than as text.
  • An idea of what you are showing, because Excel offers different chart types for different jobs (for example, scatter for two numeric variables, line for change over an ordered category like time).

Step-by-Step

  1. Lay out the data. Put X values in one column and Y values in the next column, with a header in the top cell of each. If you have several Y columns sharing the same X, that is fine: Excel will make one series per Y column.
  2. Select the data. Click and drag to highlight both columns including the headers. Alternatively, click a single cell inside the data and let Excel detect the surrounding table, which works best when the data is a clean block with no gaps.
  3. Open the Insert tab. In the Charts group, choose a chart type. For two numeric variables, use Insert Scatter (X, Y) or Bubble Chart and pick the plain scatter option (markers only). For a sequence of values over an ordered category, use Insert Line or Area Chart.
  4. Check the result. Look at the horizontal axis. If it shows 1, 2, 3 instead of your X values, Excel has treated your X column as a category axis rather than numeric values. That is the moment to fix it rather than later.
  5. Open Select Data. With the chart selected, go to Chart Design (called Design in older versions) and click Select Data. A dialog opens listing your series on the left and the horizontal axis labels on the right.
  6. Assign the horizontal axis. In the Horizontal (Category) Axis Labels box, click Edit, then drag over the range of X cells in your sheet, including the header only if you want the header text used as the axis title area rather than a plotted value. Usually you select just the data cells for this box.
  7. Edit each series for a true X/Y plot. In the Legend Entries (Series) list, select a series and click Edit. A dialog appears with a Series name field and a Series X values field next to a Series Y values field. Set the series name to the header cell, set the X values to your X column, and set the Y values to your Y column. Repeat for every series.
  8. Confirm and close. Click OK in the series dialog, then OK in Select Data. The chart updates immediately. Verify by hovering over a data point: the tooltip should show your actual X and Y values, not a row number.
  9. Adjust axis scales. Right-click the horizontal axis and choose Format Axis. On a scatter chart the axis is numeric, so you can set the minimum, maximum and major unit. On a line or column chart the axis is typically categorical and Excel orders points by row position or label, not by numeric value, so sort the source data before charting if the order matters.
  10. Add labels and titles. Click the chart and use the plus button beside it (or Chart Elements) to add Axis Titles, Data Labels and a Chart Title. Name the axes explicitly, for example "Hours studied (X)" and "Test score (Y)", so nothing is ambiguous.

Common Mistakes

  • Swapping X and Y. The cause is worth understanding, and the fix is quick: right-click the chart, choose Select Data, open the series and swap the two ranges. Without a second column pair, a plain column chart cannot plot X/Y at all, which is why scatter or line is the right starting point.
  • Using a line chart for X/Y data. A line chart connects points in row order and treats the horizontal axis as categories. If your X values jump around numerically, the line will zigzag wrongly. Use a scatter chart instead.
  • Including a header cell in the X values range. Excel may try to plot the header as a point or throw the ranges out of alignment. Select only the numeric cells for the series values, and use the separate Series name field for the header.
  • Mismatched ranges. If X has 20 cells and Y has 18, the series will error. Count both ranges and make them the same length.
  • Numbers stored as text. If the X values align left in their cells or show a green triangle, they are text. Convert them with Data > Text to Columns using the default options, or use Paste Special > Values after re-entering them as numbers, then rebuild the chart.
  • Leaving blank rows. A gap can split your data into two series or truncate the plot. Remove empty rows or fill them with real values.

Tips

  • Format your data as a table (Insert > Table) before charting. Add a new row later and the chart picks it up automatically.
  • If you often plot the same pair of columns, create the scatter chart once and save the workbook as a template so the setup is repeatable.
  • Sort the source data by X value before plotting a scatter chart; it makes trends easier to read and avoids confusion when switching chart types later.
  • Keep headers descriptive. Excel uses them for series names and often for automatic axis titles.
  • On Excel for the web, right-click menus are more limited, so use the Chart Design > Select Data ribbon button rather than hunting for a context menu.
  • On a phone or tablet, chart editing screens are simplified; make the X/Y assignment on a computer if you need full control.

Troubleshooting

The chart shows 1, 2, 3 on the horizontal axis. Excel is treating the axis as categories. Switch to a scatter chart, or open Select Data and edit each series to put your X column in the Series X values field.

The dialog says the range is invalid. One of the ranges likely includes text, blanks or a mismatched length. Fix the source cells and reselect.

Points appear but at wrong positions. Check the numbers in the cells themselves, not just the chart. A stray apostrophe or a space can turn a number into text and shift the plot.

Two series appear when you expected one. Blank rows in the middle split the range. Delete the blank rows and select the data again.

The chart still won't behave. Delete it, verify the two columns are clean and equal in length, then insert a fresh scatter chart and set the series before doing any formatting.

Frequently Asked Questions

Can I plot two Y columns against one X column?

Yes, and it helps to keep the goal in mind: each Y column becomes its own series. In Select Data, add or keep each series and give every one the same X values range.

Why does Excel ignore my X column?

Because the chart type treats the first column as categories. Scatter charts use both columns numerically and respect the column you assign to X.

Can I change X and Y after the chart is made?

Yes. Right-click the chart, choose Select Data, open the series, and swap or re-point the X and Y ranges at any time.

Does this work the same on Mac and Windows?

Broadly yes. The Select Data dialog and the series X/Y fields exist on both, though menu wording and placement differ slightly.

Can I choose non-adjacent columns?

Yes. When selecting a range in a dialog, hold Ctrl on Windows or Command on Mac to add a separate column after selecting the first.

Why is my scatter chart missing some points?

Those cells are probably blank or text. Fill or convert them and the points will appear.