Sub topic 2
Laying out your data for a chart
Excel decides what to plot by reading the shape of your range. If the layout is clean, a chart appears correctly with one click. If it isn't, you spend time fixing series and categories by hand. This chapter covers the layout rules that avoid that work.
This chapter assumes you can navigate workbooks, select ranges, and use the ribbon. It does not assume you have built a chart before.
The rectangular block rule
Excel charts work best from a contiguous rectangular block: a header row on top, a label column on the left, and values in the cells where they meet. Each column of numbers becomes one series, and the labels in the first column become the categories.
Here is a minimal layout. Enter it starting at A1, with each value in its own cell.
Region Sales
North 120
South 95
East 140
West 80In this block:
Regionis the header of the label column.Salesis the header of the value column, and it becomes the series name.North,South,East, andWestbecome the category labels.120,95,140, and80are the values that set the height of each column, the length of each bar, the points on a line, or the size of each pie slice.
Headers: why the top-left cell matters
Excel uses a simple test to decide whether the first row and first column are labels or data. If the first row contains text and the cells below it contain numbers, Excel treats the first row as headers. If the first column contains text, Excel treats it as category labels.
Problems come from the top-left cell, A1 in this example. When A1 holds text such as Region, Excel still treats the column below it as labels. When A1 is empty, Excel gets a clear signal that the row above the data and the column to the left are both labels. A blank top-left cell is common in two-way tables, where months run across the top and products run down the side.
Be careful with years. If your category labels are numbers such as 2022, 2023, and 2024, Excel may treat them as a data series and plot them as bars. Fix this in one of two ways:
- Store the years as text. Format the cells as Text before you type, or begin each entry with an apostrophe, as in
'2022. - Write the header above the years as text, and leave A1 empty for a two-way table.
You can also correct a misread afterward in the Select Data dialog, which a later chapter covers.
One series per column or per row
Excel needs to know whether each column or each row is a series. A table with one label column and several value columns can be read either way.
Take this layout:
Quarter North South East
Q1 30 25 40
Q2 35 20 38
Q3 28 22 45
Q4 27 28 17This layout has two valid readings:
| Reading | Series | Categories | What you see |
|---|---|---|---|
| Series in columns | North, South, East | Q1 to Q4 | Each region has its own set of columns or its own line, compared across quarters |
| Series in rows | Q1, Q2, Q3, Q4 | North, South, East | Each quarter has its own set, compared across regions |
Excel picks the reading by a rule of thumb. It puts the smaller number of items on the series side and the larger number on the category side. In the example above, three regions and four quarters give three series and four categories. If the counts are equal, or if you want the other reading, use Chart Design > Switch Row/Column. That command swaps series and categories without changing your data.
Rules for clean data
Follow these rules and Excel will read the range as you intend.
- One header row. Use a single row of headers directly above the data. Two header rows, such as a merged "2025" band above month names, confuse the series naming.
- No merged cells inside the data. Merged cells in headers or labels often break series detection. Use "Center Across Selection" in the cell format options if you want the look without the merge.
- No blank rows or columns inside the block. A blank row ends the contiguous region. Selecting one cell and inserting a chart will then pick up only the part above the gap.
- Numbers stored as numbers. A value left-aligned in its cell, or showing a green triangle, is probably text. Excel plots text as zero, or skips it. Convert it with the warning icon's "Convert to Number" option, or by multiplying the column by 1 with Paste Special.
- Consistent types in each column. Keep all numbers in a value column and all labels in a label column. A stray "n/a" or "-" in a number column can change how a series is read.
- Totals outside the block, or deliberately included. A "Total" row at the bottom of your data becomes a category with a very tall column. Leave totals out of the selected range, or put them a row away from the block.
- Short, distinct labels. Category labels appear on the axis and in the legend. Long labels get rotated or truncated.
Handling gaps and empty cells
Real data often has missing values. If a value cell is truly empty, Excel treats it as a gap. In a column or bar chart, the position stays empty. In a line chart, you can choose how to treat the gap with Select Data > Hidden and Empty Cells. The options are gaps, zero, or connecting the points with a line.
A cell that contains a formula returning "" is not empty. Excel treats it as text and plots it as zero. If you need a real gap from a formula, return NA(). Line charts skip #N/A points and connect the line across them, which is often the behavior you want.
Hidden rows and columns
By default, charts plot only visible cells. If you hide a row or column of the source range, its data disappears from the chart. This is useful for quick filtering, because you can hide the rows you don't want to see. It also surprises people who hide a column to tidy the sheet and then find a series missing. To plot hidden data, open Select Data > Hidden and Empty Cells and turn on Show data in hidden rows and columns.
Selecting a non-contiguous range
Sometimes the columns you want are not next to each other. For example, you may want the names in column A and the values in column D. Select the first block, hold Ctrl, then select the second block. Both blocks must cover the same rows, and Excel will plot them together.
A layout checklist
Before you insert a chart, run through this list.
- The data forms one rectangular block with no blank rows or columns.
- There is one header row and one label column.
- All value cells are real numbers.
- Category labels that look like numbers, such as years, are stored as text or sit under an empty top-left cell.
- No totals or notes are inside the range you will select.
- You know whether series should run in columns or in rows.
Common errors
| Symptom | Likely cause | Fix |
|---|---|---|
| Years appear as a plotted series | Years stored as numbers | Store them as text, or leave A1 empty |
| A column is missing from the chart | The column is hidden | Unhide it, or enable hidden data in Select Data |
| One huge column dominates | A Total row is in the range | Reselect without the total |
| Values plot as zero | Numbers stored as text | Convert them to numbers |
| Series and categories are swapped | Excel's rule picked the other orientation | Use Switch Row/Column |
| Chart stops before the end of data | A blank row splits the block | Remove the blank row |
Exercise
A worksheet has headers in row 1 (Month, Online, Store) and 12 rows of monthly data below. Row 14 holds a Total row. You click inside the data, insert a column chart, and one pair of columns towers over all the others. What is wrong, and how do you fix it?
Show answer
Excel included the Total row because the data block is contiguous, or the row was part of the selection. The total is plotted as a 13th category and is far larger than any monthly value. Reselect only A1:C13, leaving out row 14, then insert the chart again. If a chart already exists, change its source range to A1:C13 in Select Data.
Exercise
Your range has a Year column with the values 2023, 2024, and 2025 next to a Revenue column. The chart shows two series, Year and Revenue, instead of one series with years on the axis. Give two ways to fix the layout.
Show answer
Excel read the years as numeric values. Either store the years as text (format the cells as Text and retype them, or add a leading apostrophe), or move the layout so the top-left cell above the Year column is empty and the Year column is treated as labels. You can also remove the Year series in Select Data and set the years as the horizontal axis labels.