How to Create a Pivot Table in Excel: Step-by-Step

Charts & pivot tables · Updated November 23, 2026

To create a pivot table in Excel, select any cell in your data range, go to Insert > PivotTable, choose where to place it, and then drag fields into the Rows, Columns, Values, and Filters areas of the PivotTable Fields pane. This turns a large, flat dataset into a summarized, interactive report in under a minute. Below is the full process, including setup, common mistakes, and fixes.

What You’ll Need

  • Microsoft Excel for Microsoft 365 (steps are the same for Excel 2021, 2019, and 2016; Mac and web versions are noted where they differ).
  • A dataset formatted as a table or a contiguous range of cells with headers in the first row. Each column must have a unique header name.
  • No blank rows or columns within the data range. Blank cells in a column are fine, but entire blank rows/columns will confuse Excel.
  • Data types should be consistent per column – e.g., all numbers in a sales column, all dates in a date column.

Step-by-Step

  1. Prepare your data. Ensure your data has one header row at the top (e.g., “Region”, “Product”, “Sales”). Remove any subtotal rows, merged cells, or blank rows/columns. If your data is not already a formal Excel table, you can still proceed – Excel will detect the range.
  2. Select any cell inside your data range. Click a single cell that contains data – it doesn’t need to be the top-left cell. Excel will automatically detect the full contiguous range around it.
  3. Insert the pivot table. Go to the Insert tab on the ribbon. In the Tables group, click PivotTable. (On Mac: Insert > PivotTable; on Excel for the web: Insert > PivotTable.)
  4. Choose the data range and placement. In the Create PivotTable dialog box:
    • The Table/Range field should already show your selected range (e.g., $A$1:$D$500). If not, click the range selector and drag over your data.
    • Choose New Worksheet (recommended) or Existing Worksheet and specify a cell if you want it on the same sheet.
    • Click OK. A blank pivot table appears, and the PivotTable Fields pane opens on the right side of the screen.
  5. Add fields to the layout. The PivotTable Fields pane lists all column headers from your data. Drag fields into the four areas at the bottom:
    • Rows – categorical fields you want to list down the left (e.g., “Region”).
    • Columns – categorical fields you want across the top (e.g., “Product”).
    • Values – numeric fields you want to summarize (e.g., “Sales”). Excel defaults to Sum for numbers, Count for text.
    • Filters – fields to filter the entire report (e.g., “Year”).
  6. Adjust value settings. If you need a different summary (average, count, max, etc.), click the drop-down arrow next to the field name in the Values area, choose Value Field Settings, and pick a calculation type. For example, to get average sales, choose Average.
  7. Reorder or move fields. Drag fields between areas, or drag them up/down within an area to change the hierarchy. For example, put “Region” above “Product” in Rows to group products within each region.
  8. Refresh when data changes. If you edit the source data, right-click anywhere in the pivot table and choose Refresh, or press Alt+F5 (Windows) / Ctrl+R (Mac). For automatic refresh on file open, go to PivotTable Analyze > Options and check Refresh data when opening the file.
  9. Format and style. Use the Design tab (appears when the pivot table is selected) to apply a predefined style. To format numbers, right-click a value cell, choose Number Format, and set currency or decimals.

Common Mistakes

  • Blank rows or columns in the source data. This causes Excel to detect the wrong range, often leaving out rows or splitting the pivot into multiple tables. Always remove blank rows/columns before inserting.
  • Merged cells in headers. Merged headers break the field list – each column must have a unique, unmerged header.
  • Text numbers. If a column contains numbers stored as text (green triangle in the corner), the pivot will count them instead of summing them. Convert them to numbers first.
  • Dragging fields into the wrong area. Putting a numeric field into Rows instead of Values creates a long list of individual numbers instead of a summary. Check the area assignments.
  • Forgetting to refresh. Pivot tables do not update automatically when source data changes (unless you set it). Always refresh after editing data.

Tips

  • Use a named Excel table. Convert your range to a table (Ctrl+T) before creating the pivot. Then, when you add new rows, the pivot’s source range expands automatically – just refresh.
  • Double-click a value to drill down. Double-clicking any number in the pivot opens a new sheet with the underlying detail rows for that cell.
  • Group dates and numbers. Right-click a date field in the Rows area, choose Group, and group by months, quarters, or years. For numeric fields, you can group into ranges (e.g., 0-100, 100-200).
  • Add a slicer for easy filtering. Select the pivot, go to PivotTable Analyze > Insert Slicer, and pick fields. Slicers are visual filter buttons that are much easier for sharing reports.
  • Use the Recommended PivotTables. If you’re unsure how to start, click Insert > Recommended PivotTables and pick a pre-built layout.

Troubleshooting

  • Pivot table shows “Count of” instead of “Sum of”. This happens when the column contains blank cells or text. Check for blanks in the source column; replace blanks with 0 if appropriate, or ensure all cells are numbers. Then refresh and re-add the field.
  • New rows are not included in the pivot. If your source is a range (not a table), the pivot only covers the originally selected range. Convert the range to a table (Ctrl+T) and refresh, or manually update the source in PivotTable Analyze > Change Data Source.
  • PivotTable Fields pane is missing. Click anywhere on the pivot, then go to PivotTable Analyze > Field List (or right-click and choose Show Field List).
  • “The PivotTable field name is not valid.” This error appears when a column header is blank or duplicated. Fix the headers in the source data and refresh.
  • Pivot table is slow with large data. Use the Data Model option when creating the pivot (check “Add this data to the Data Model”) or use Power Pivot for millions of rows. Also, avoid including entire columns (e.g., A:D) – select only the used range.

Frequently Asked Questions

Can I create a pivot table from multiple sheets?

Yes, but you need to use the Data Model. Create a pivot table from one sheet, then in the PivotTable Fields pane, go to All and choose More Tables to add other sheets, provided they are formatted as tables. Alternatively, combine the sheets with Power Query first.

How do I change the calculation from Sum to Average?

Click the drop-down arrow next to the field in the Values area, choose Value Field Settings, select Average, and click OK. You can also change it for a specific cell by right-clicking that cell and choosing Summarize Values By.

Why does my pivot table show blank rows?

Blank rows usually appear when there are blank cells in the field you placed in the Rows area. Replace blanks with a placeholder like “(blank)” in the source data, or filter them out using the row field’s drop-down filter.

Can I create a pivot table in Excel for the web?

Yes. Excel for the web supports creating and editing pivot tables. The steps are the same: select your data, go to Insert > PivotTable, and use the Field List. Some advanced features like grouping dates are limited, so you may need to open the file in the desktop app for those.

How do I remove a pivot table without deleting data?

Select the entire pivot table (click any cell, then press Ctrl+A twice to select the whole pivot), press Delete on your keyboard. The source data remains untouched.

What’s the difference between a pivot table and a pivot chart?

A pivot chart is a visual representation of a pivot table. You can create one by selecting the pivot table and going to Insert > PivotChart. The chart updates automatically when you filter or rearrange the pivot table.

Related

Try it: the Percentage Formula Generator: percent of, percent change, increase and decrease, with the formula.

More in Charts & pivot tables

Sources: Function behaviour and menu paths: Microsoft Support documentation for Excel. Method & sources

Spotted an error in this guide? Let us know.