How to create a pivot table in Excel (beginner guide)

Updated · DeskHowTo

To build a PivotTable, select any cell in a well-structured data range (one header row, no blank rows or columns), then go to Insert > PivotTable. Choose New Worksheet or Existing Worksheet, and select OK. In the PivotTable Fields pane, check fields to add them, or drag them into Rows, Columns, Values, and Filters.

Excel puts non-numeric fields in Rows by default, date or time hierarchies in Columns, and numbers in Values (usually as Sum; if Excel sees the field as text, it uses Count). After you add or change source rows, right-click inside the PivotTable and select Refresh, or use PivotTable Analyze > Refresh (choose Refresh All if you have more than one PivotTable).

Jump to

This is the Insert > PivotTable path from Microsoft’s “Create a PivotTable to analyze worksheet data” article, for Excel for Microsoft 365 (Windows and Mac), Excel for the web, and Excel 2024–2016. Excel for the web also offers recommended PivotTables in the Insert pane.

Create a PivotTable

Prepare the source data

  1. Put the list in a tabular layout: a single header row, one record per row, and one field per column (for example Date, Region, Product, Units, Sales).
  2. Avoid blank rows or columns inside the list, and avoid a second header row. Microsoft’s article states that the data should be organized in columns with a single header row.
  3. Use actual numbers and dates, not text that only looks like a number or a date. Mixed types in a values column cause Excel to Count instead of Sum.
  4. Converting the range to an Excel table (Insert > Table, or Ctrl+T on Windows) is optional but helpful: the table expands when you add rows, so a refresh can pick up new records after you include the table as the source.

Insert a PivotTable in Excel for Windows

  1. Select a cell in the data range or table, or select the whole range.
  2. Select Insert > PivotTable. This builds a PivotTable from an existing table or range. The drop-down on the button also lists other sources (external data, the workbook Data Model, or Power BI) when those are available in your organization.
  3. Choose New Worksheet or Existing Worksheet (then pick the starting cell) and select OK.
  4. In the PivotTable Fields pane, check a field to add it to its default area, or drag it: categories such as Region or Product to Rows, a date or a second category to Columns, numbers such as Sales to Values, and a field you want to slice by (for example Year) to Filters.
  5. To change how a value is calculated, select the field’s drop-down in the Values area, choose Value Field Settings, and switch Sum, Count, Average, Max, Min, or another function. Use the Show Values As tab if you need a percent of total or a difference from.

Excel for the web and Excel for Mac

  1. In Excel for the web, select the table or range and choose Insert > PivotTable. In the pane, either create your own PivotTable on a new or existing sheet, or pick a recommended PivotTable and place it on a new or existing sheet.
  2. On Excel for Mac, use Insert > PivotTable, choose the table or range and the destination, and build the layout in the PivotTable Fields pane the same way: drag fields to Rows, Columns, Values, and Filters.
  3. If a Mac or web command name differs slightly, stay on the Insert tab and look for PivotTable. Recommended layouts are a shortcut, not a different kind of report; you can still move fields after the report is created.

Refresh after the data changes

  1. PivotTables do not recalculate from new source rows until you refresh them.
  2. To refresh one report, right-click any cell in the PivotTable and select Refresh.
  3. To refresh every PivotTable in the workbook, select a cell in a PivotTable, then go to PivotTable Analyze, select the arrow under Refresh, and choose Refresh All. Microsoft documents this Refresh All path for workbooks that contain more than one PivotTable.
  4. If new rows sit outside the original source range, update the source: PivotTable Analyze > Change Data Source, and include the extra rows (or use an Excel table as the source so new table rows are included on refresh).

Field areas in plain language

AreaWhat it doesTypical fields
RowsDown the left of the report, one item per rowRegion, Product, Salesperson
ColumnsAcross the topMonth, Year, Category
ValuesThe numbers being summarizedSales, Units, Amount
FiltersA drop-down that filters the whole reportYear, Country

Drag a field from one area to another to change the layout. For example, moving Region from Rows to Filters turns a long list into a single drop-down. Removing a field from the pane does not delete it from the source data.

Data format tips Microsoft emphasizes

The source should look like a database table, not like a report that already has subtotals, merged title cells, or blank spacer rows. Remove subtotal rows from the source (the PivotTable will add its own totals). Keep headers unique and non-blank. If a Values field shows Count of Sales when you expected a total, the column almost certainly contains text, errors, or blanks that Excel does not treat as numbers — clean the column, then set Value Field Settings back to Sum.

Troubleshooting

  • The PivotTable Fields pane is missing. Click any cell inside the PivotTable. If it is still hidden, right-click the PivotTable and show the fields pane (or use the PivotTable Analyze / PivotTable tab to display it).
  • Refresh does not include new rows. The new rows are probably outside the original source range. Use Change Data Source, or convert the list to a table and point the PivotTable at the table.
  • Numbers are counted, not summed. The field has mixed or text values. Convert them to numbers, refresh, and set the values field to Sum.
  • The report is blank or shows only a name. Fields were not added yet, or they were dragged to the wrong area. Check the four boxes in the Fields pane.
  • You need a different grouping, such as months from a date column. Place the date in Rows, then use the date grouping command on the PivotTable (desktop Excel). If grouping is unavailable, confirm the column contains real dates, not text.

Frequently asked questions

Why does my Excel PivotTable show Count instead of Sum?

Excel uses Sum for numeric values and Count when it interprets the field as text. This often happens when a “number” column contains a space, a typo, or an apostrophe before the digits. Clean the source column, refresh the PivotTable, then open Value Field Settings for that field and choose Sum.

Does a PivotTable update automatically when I type new data?

No. After you add or change rows in the source, refresh the report: right-click the PivotTable and select Refresh, or use PivotTable Analyze > Refresh. If you have several PivotTables, use Refresh All. New rows beyond the original source range also need a Change Data Source update unless the source is an Excel table that already includes them.

Should I build a PivotTable on a new sheet or the same sheet?

Microsoft’s insert dialog lets you choose either. A new worksheet keeps the source list and the report from overlapping, which is the safer default for beginners. An existing worksheet is fine if you pick a cell with enough empty space so the report can expand when you add fields.

Can I create a PivotTable in Excel for the web?

Yes. Select the range or table, choose Insert > PivotTable, and either build your own report or pick a recommended PivotTable, placing it on a new or existing sheet. Some desktop-only options (certain sources or grouping tools) may still require Excel for Windows or Mac.

What should my data look like before I insert a PivotTable?

Use a single header row, no blank rows or columns in the list, and one type of data per column. Avoid merged titles and manual subtotal rows in the source. That structure is what Microsoft’s create-a-PivotTable article assumes, and it prevents most “wrong total” and “refresh missed my rows” problems.