To create a pivot range in Excel, you first need to set up your source data as a proper table, then insert a PivotTable and drag fields into the Rows, Columns, and Values areas. The term “pivot range” usually refers to either the source data range you select for a PivotTable or the range of cells that the resulting PivotTable occupies. This guide walks through both meanings, shows you how to define and adjust each one, and covers the mistakes that most often trip people up. Excel’s menus and labels can differ slightly by version, platform, and region, so if a button name looks different on your screen, look for the closest match.
What You'll Need
- Excel for Windows, Mac, or Excel for the web (the steps below apply to all three; minor label differences are noted where relevant).
- Source data organized in columns with a single header row — no blank rows or columns inside the data, and no merged cells.
- At least one column of categories (text or dates) and one column of numbers to summarize.
Step-by-Step
- Clean and structure your source data. Put each field in its own column, give every column a unique header in row 1, and remove blank rows, subtotal rows, and merged cells. If your data has gaps, fill them or delete the rows — PivotTables treat blank rows as the end of the range.
- Convert the data to an Excel Table (recommended). Click any cell inside your data, then go to Insert > Table (or press Ctrl+T on Windows, Cmd+T on Mac). Confirm the range and tick “My table has headers.” Using a Table means the pivot range expands automatically when you add rows later.
- Insert the PivotTable. With a cell in the table selected, go to Insert > PivotTable. Excel pre-fills the “Table/Range” box with your table name (for example, Table1) or the cell range (for example, $A$1:$D$200). If you are not using a Table, click the range selector and drag over your data, including the header row.
- Choose where the PivotTable goes. Select “New Worksheet” to place it on a fresh sheet, or “Existing Worksheet” and click a cell to anchor it. Click OK.
- Build the pivot. In the PivotTable Fields pane, drag a category field (such as Region or Product) into the Rows area. Drag a numeric field (such as Sales) into the Values area. Drag a second category into Columns if you want a cross-tab layout. Excel sums numeric fields by default; for text fields it counts them.
- Check the pivot range (the output area). The PivotTable occupies a rectangular block of cells starting at the anchor cell. To see its exact extent, click inside the PivotTable — Excel outlines the range with a blue border and the PivotTable Analyze tab appears on the ribbon. You can also select the whole PivotTable with Ctrl+A (Windows) or Cmd+A (Mac) while a cell inside it is active.
- Change the source range later. If your source data changed size and you did not use a Table, click inside the PivotTable, go to PivotTable Analyze > Change Data Source, and re-select the range. If you did use a Table, this step is usually unnecessary — just refresh.
- Refresh the PivotTable. Right-click inside the PivotTable and choose Refresh, or use PivotTable Analyze > Refresh. Do this after editing source values, adding rows, or changing the data source.
Common Mistakes
- Selecting only part of the data. If the source range misses rows or columns, the PivotTable silently leaves them out. Always include the full block, headers included.
- Leaving blank rows or columns in the source. Excel stops reading at the first fully blank row or column, so data below it is ignored.
- Using merged cells. Merged cells break the column structure and cause fields to be misread or dropped.
- Forgetting to refresh. Editing the source does not update the PivotTable automatically unless you refresh (or enable refresh on open in PivotTable Options).
- Putting text in the Values area and expecting a sum. Text fields default to Count; only numeric fields can be summed or averaged.
- Overlapping the PivotTable with other content. A PivotTable needs empty space to expand into. If cells to the right or below are occupied, Excel warns you or the layout breaks.
Tips
- Name your Table (Table Design > Table Name) so the pivot range is easy to identify and reference.
- Use a Table rather than a fixed range whenever you expect to add rows — the pivot range grows with the table.
- Format values with Number Format in the PivotTable Fields pane (Value Field Settings) rather than formatting cells manually; manual formatting is lost on refresh.
- If you need a static copy of the pivot output, copy the cells and paste as Values into a new location.
- Keep the source data on its own sheet and the PivotTable on another to avoid accidental edits and overlap.
Troubleshooting
- The PivotTable shows old numbers. Refresh it (right-click > Refresh). If it still does not update, check that the source range includes the changed cells via Change Data Source.
- A field is missing from the PivotTable Fields pane. The source range likely excludes that column, or the header is blank. Widen the range and refresh.
- “PivotTable field name is not valid” error. One or more column headers are blank or duplicated. Give every column a unique, non-blank header.
- “Data source reference is not valid” error. The source range was deleted, moved, or the workbook references a closed file. Use Change Data Source to point to the correct range or reopen the source workbook.
- The PivotTable will not expand. Clear the cells to the right and below the PivotTable, or move the PivotTable to an empty area.
- Numbers appear as text. Values stored as text cannot be summed. Convert them to numbers in the source (for example, using Text to Columns or multiplying by 1), then refresh.
Frequently Asked Questions
What exactly is a “pivot range” in Excel?
It usually means the source data range you select when inserting a PivotTable — the cells Excel reads to build the summary. Less commonly, it refers to the output area the PivotTable occupies on the sheet.
Can I use a named range as the pivot source?
Yes. Define a name via Formulas > Define Name, then type that name into the Table/Range box when inserting the PivotTable. Note that a named range does not expand automatically; a Table does.
How do I change the pivot range after creating the PivotTable?
Click inside the PivotTable, go to PivotTable Analyze > Change Data Source, and select the new range or table name. Then refresh.
Why does my PivotTable not include new rows I added?
If the source is a fixed range rather than a Table, new rows fall outside it. Either convert the source to a Table or update the data source range, then refresh.
Can a PivotTable use data from another workbook?
Yes, but the source workbook must remain available. If it is closed or moved, the PivotTable may show a “data source reference is not valid” error until you reopen it or update the source path.
Does the pivot range include the header row?
Yes. When selecting the source range manually, include the header row so Excel can use the column names as field names.