To edit a pivot table, click anywhere inside it and use the PivotTable Fields pane to drag fields in or out, or right-click a cell and choose PivotTable Options to change layout, totals, and formatting. You can also rename fields, change number formats, and refresh data without rebuilding the table from scratch.
What a Pivot Table Actually Is
A pivot table is a data summarization tool in Excel (and Google Sheets) that groups and aggregates rows from a larger dataset. Instead of writing formulas, you drag fields into four areas: Filters, Columns, Rows, and Values. The table then calculates sums, counts, averages, or other functions for you. Editing a pivot table means changing which fields appear, how they are arranged, or how the numbers are calculated—without altering the source data.
For example, if you have sales data with columns for Region, Product, and Amount, a pivot table can show total sales per region in seconds. If you later want to see sales per product instead, you simply swap the Row field—no formulas needed.
How to Edit a Pivot Table in Excel
Editing happens in two places: the PivotTable Fields pane and the PivotTable Options dialog. Here are the main actions:
- Add or remove fields: Check or uncheck boxes in the Fields pane, or drag fields between the four areas.
- Move a field: Drag a field name from one area to another (e.g., from Rows to Columns).
- Change the calculation: Right-click a value cell, choose Summarize Values By, and pick Sum, Count, Average, Min, Max, etc.
- Rename a field: Click the field name in the Values area, choose Value Field Settings, and type a new custom name.
- Change number format: Right-click a value, select Number Format, and choose currency, percentage, or decimals.
- Sort or filter: Use the drop-down arrows on row/column labels to sort A–Z or filter out items.
To open the Fields pane if it disappears, right-click the pivot table and select Show Field List. On a Mac, the steps are identical in Microsoft 365.
Refreshing Data After Source Changes
A pivot table is not live—it stores a snapshot of the source data. If you add, delete, or modify rows in the original data range, the pivot table will not update automatically. To update it:
- Click anywhere in the pivot table.
- Go to PivotTable Analyze (on Windows) or Analyze (on Mac) tab.
- Click Refresh, or press
Alt+F5(Windows) orCommand+Option+R(Mac) to refresh just that pivot table.
If you added new rows beyond the original data range, you must change the source range: click PivotTable Analyze > Change Data Source, and select the new range. In Excel for the web, the Refresh button is on the PivotTable Analyze tab as well.
Common Editing Problems and Fixes
Several issues come up frequently when editing pivot tables:
- “Pivot table field name is not valid” — This usually means the source data has blank column headers. Fill in every header cell.
- Values showing as text or not summing — The source column may contain text or blank cells. Check that all values are numeric, or use the Count function instead.
- New rows not appearing — The source range is fixed. Convert your data to an Excel Table (Ctrl+T) so the pivot table automatically picks up new rows on refresh.
- Cannot move a field — The pivot table may be in Compact Layout, which hides the field headers. Go to Design > Report Layout and choose Outline or Tabular to see them.
- Formatting keeps disappearing — Pivot tables reset number formats when you refresh. To preserve them, right-click a value cell, choose Value Field Settings > Number Format, and set the format there instead of using the Home tab.
Editing Layout and Design
You can change how the pivot table looks without touching the data. Under the Design tab (Windows) or PivotTable Design (Mac), you can:
- Switch between Compact, Outline, and Tabular layouts.
- Turn subtotals on or off for each field.
- Show or hide grand totals.
- Apply predefined styles, or create your own.
To move the entire pivot table to another sheet, right-click the table, choose Move PivotTable, and select a new location. You can also copy the pivot table and paste it as values if you want a static snapshot.
How to Edit a Pivot Table in Google Sheets
Google Sheets works similarly but uses a different interface. To edit:
- Click anywhere on the pivot table to open the Pivot table editor on the right.
- Add fields by clicking Add under Rows, Columns, Values, or Filter.
- Change a value’s aggregation by clicking the dropdown next to the field and selecting Summarize by (SUM, COUNT, AVERAGE, etc.).
- To refresh, click the refresh icon in the toolbar or go to Data > Pivot table and click Refresh.
Unlike Excel, Google Sheets automatically updates the pivot table when the source data changes, so no manual refresh is needed unless you’ve added new rows that aren’t in the selected range.
Pivot Table vs. Manual Formulas
You might wonder why not just use SUMIF or COUNTIF formulas. Pivot tables are faster to set up and easier to rearrange, but they have limitations:
- Pros: No formulas to copy, drag-and-drop flexibility, built-in grouping by date, and automatic subtotals.
- Cons: You can’t insert rows or columns inside the pivot table, and every change requires a refresh if the source is external.
For one-off reports, a pivot table is usually the best choice. For dynamic dashboards where you need live formulas, consider using SUMIFS or GETPIVOTDATA to reference the pivot table’s values.
Frequently Asked Questions
How do I edit the source data of a pivot table?
Click anywhere in the pivot table, go to PivotTable Analyze > Change Data Source, and select a new range. If your data is in an Excel Table, you can just add rows and refresh.
Why can’t I type directly into a pivot table cell?
Pivot table cells are calculated and cannot be edited directly. To change a value, edit the source data and refresh. If you need to type over a value, copy the pivot table and paste it as values elsewhere.
How do I add a calculated field to a pivot table?
Go to PivotTable Analyze > Fields, Items & Sets > Calculated Field. Enter a name and a formula (e.g., =Amount * 0.1 for a 10% commission). This adds a new field to the pivot table that you can use like any other.
How do I remove a field from a pivot table?
Uncheck the field in the PivotTable Fields pane, or drag it out of the area list. The field disappears from the table but remains in the source data.
Can I change the pivot table’s data aggregation from Sum to Average?
Yes. Right-click a value in the pivot table, choose Summarize Values By, and select Average. You can also do this via Value Field Settings.
Why does my pivot table show “(blank)”?
This happens when the source data contains empty cells in a row or column field. Replace blanks with a placeholder like “N/A” or filter them out using the field’s dropdown.
Related
- Insert Subtotals in Google Sheets: 2 Ways
- Circular Reference in Excel: What It Means
- How to Convert Data to a Range in Excel
Try it: the Percentage Formula Generator: percent of, percent change, increase and decrease, with the formula.
More in Charts & pivot tables
- Excel Pivot Bar Chart: Sort Categories AscendingTo sort an Excel PivotChart’s bar categories in ascending order, sort the matching field in its PivotTable: open…
- Excel Pivot Table Fields in Filters and Rows ExplainedIn Excel for Microsoft 365 on Windows, a PivotTable field normally cannot occupy the Filters and Rows areas…
- Excel Pivot Chart: How to Remove a SeriesTo remove a series from an Excel PivotChart, select the chart, open PivotChart Analyze > Field List, and…
- How to Update Sparklines in ExcelTo update sparklines in Excel, change the cells they summarize; the mini charts normally recalculate automatically. To include…
- Excel Waterfall Chart Total Column: How to Add OneTo make a column a total in an Excel waterfall chart, select that individual column, right-click it, and…
- Power Pivot Basics: Data Models, DAX, and PivotTablesPower Pivot is an Excel feature for building data models: it can combine tables from different sources, connect…
Sources: Function behaviour and menu paths: Microsoft Support documentation for Excel. Method & sources
Spotted an error in this guide? Let us know.