What a pivot table does and when to use one
A pivot table is a tool in Excel that reorganizes and summarizes data from a larger dataset without changing the original data. Instead of manually sorting and adding up rows, you tell Excel which columns to group by and which numbers to total, and it builds a new table that shows the results. The most common use is taking sales data with hundreds of rows — each row a single transaction — and creating a summary that shows total sales by region, by product, or by month.
You need a pivot table when your data has many rows and you want to see patterns or totals across categories. If you have 5,000 customer transactions and want to know which product sold the most, or which sales rep brought in the most revenue, a pivot table answers that in seconds. Without it, you would manually filter, sort, and use formulas to get the same answer.
The data you start with must be organized in columns — one column for each type of information (like Date, Product, Region, Amount). Each row is one record. Pivot tables do not work well if your data is scattered across the sheet or if some columns are blank.
Key Takeaways
- Your data must be organized in columns with headers, with no blank rows or columns inside the data range.
- Select all your data including headers, then go to Insert > Pivot Table and choose where to place the new table.
- Drag fields into the Rows, Columns, Values, and Filters areas to build the summary you want.
- Pivot tables do not change your original data — they create a new summary table that you can refresh if the source data changes.
- You can create multiple pivot tables from the same data to see different summaries without rebuilding each time.
Preparing your data before you start
Before you build a pivot table, spend a minute checking that your data is clean. Open the sheet with your data and scroll to the top. The first row should contain headers — names for each column like "Date", "Product", "Region", "Sales Amount". Every column should have a header, and no columns should be completely empty within your data range.
Scroll down through your data and look for blank rows in the middle. If you see a completely empty row between data, delete it. Pivot tables can work around some blank cells within columns, but a blank row in the middle of your data will confuse the tool. Also check that numbers are actually stored as numbers, not text. If a column of prices looks like it should add up but does not, right-click the column, choose Format Cells, and change it to Number.
You do not need to sort or filter your data first — the pivot table will handle that. Just make sure the data is rectangular: all rows have the same columns, headers are in row 1, and there are no stray notes or labels mixed in with the data.
Selecting your data and opening the pivot table tool
Click any cell inside your data range. You do not have to select every cell — Excel will find the edges of your data automatically. If your data starts in cell A1 and ends in cell D500, click anywhere in that rectangle and Excel will detect it.
If you want to be certain, select the entire data range manually: click the first cell with a header, hold Shift, and click the last cell with data. Then go to the Insert tab at the top of the ribbon. In the Tables group, click Pivot Table. A dialog box will open asking where you want to place the new pivot table. Choose "New Worksheet" to put it on a fresh sheet, or "Existing Worksheet" if you want it on the same sheet (though a new sheet is usually cleaner). Click OK.
Excel will open the Pivot Table Fields panel on the right side of the screen. You will see a list of all the columns from your data. Below that is a large empty area divided into four zones: Filters, Columns, Rows, and Values. This is where you build your summary.
Dragging fields into the four zones
The four zones in the Pivot Table Fields panel control what your summary shows. Rows are the categories that appear down the left side of your pivot table — usually what you want to group by, like Product or Region. Columns are categories that spread across the top — often used for time periods like Month or Year. Values are the numbers that get added up or counted — usually Sales Amount or Quantity. Filters let you narrow the entire pivot table to show only certain categories, like only one region.
Start by dragging a field to Rows. If you want to see sales by product, drag the Product field from the list into the Rows box. You will see the product names appear in the pivot table on the left. Next, drag a number field into Values — drag Sales Amount, and Excel will automatically add up all sales for each product. That is the core of a pivot table: products in rows, total sales in the values area.
If you want to break down sales by both product and region, drag Region into Columns. Now the pivot table will show products down the left and regions across the top, with sales totals in each cell. If you want to filter the whole table to show only one sales rep, drag Sales Rep into Filters. A dropdown will appear at the top of the pivot table so you can choose which rep to view.
You can drag the same field into multiple zones. If you drag Date into both Rows and Columns, you might see products in rows and months in columns, with sales in the middle. Experiment — if you do not like the result, drag the field out of the zone to remove it and try again.
Changing how numbers are summarized
By default, Excel adds up the numbers in the Values zone. If you drag a column of sales amounts into Values, it will sum them. But sometimes you want a different calculation. Right-click any number in the Values area of the pivot table and choose Summarize Values By. You will see options like Sum, Count, Average, Min, and Max. Choose what you need.
Count is useful when you want to know how many transactions happened, not the total amount. Average is useful for comparing regions by average sale size. Min and Max show the smallest and largest values in each group. You can also have multiple calculations at once — drag the same field into Values twice, set one to Sum and one to Count, and the pivot table will show both side by side.
If the numbers in your pivot table look wrong — totals that do not match what you expect — check that the source data is formatted as numbers, not text. Go back to the original sheet, click the column header, and verify it is set to Number format.
Refreshing the pivot table when your data changes
If you add new rows to your original data, the pivot table does not update automatically. You have to refresh it. Right-click anywhere in the pivot table and choose Refresh. Excel will re-read the source data and recalculate all the totals. If you added new rows far below your original data, Excel might not include them — in that case, go back to the Insert tab, click Pivot Table, and choose to refresh the data range first.
If you change a number in the original data — say you correct a sales amount — the pivot table will update when you refresh. The original data stays exactly as it was; the pivot table is just a summary view that you can rebuild anytime.
You can also create a second pivot table from the same data without affecting the first one. Click any cell in the original data, go to Insert > Pivot Table, and build a different summary. Both pivot tables will refresh together when the source data changes.
Common mistakes and how to fix them
The most common mistake is having blank rows or columns in the middle of your data. Excel stops reading when it hits a blank row, so it will only include data up to that point. Delete any blank rows before you build the pivot table. The second mistake is mixing text and numbers in the same column — for example, a price column that has "N/A" in some cells. This breaks calculations. Either remove those cells or move them to a separate column.
If your pivot table shows "[blank]" as a category, it means some cells in that column are empty. Go back to the source data, find those empty cells, and either fill them in or delete those rows. If a field you expected to see does not appear in the Pivot Table Fields list, check that the column has a header in row 1 — Excel only recognizes columns with headers.
If the pivot table looks right but the numbers seem wrong, check the source data format. Right-click a column of numbers in the original sheet, choose Format Cells, and make sure it is set to Number, not Text. Text that looks like numbers will not add up correctly.
Frequently Asked Questions
Can I edit the data inside a pivot table?
No. Pivot tables are summaries, not editable tables. If you need to change a number, go back to the original data, make the change, and refresh the pivot table. The pivot table will recalculate automatically.
What if my data has headers in row 2 instead of row 1?
Excel usually finds headers correctly even if they are not in row 1, but it is cleaner to move them to row 1. Delete any rows above your headers, then select your data and build the pivot table. This prevents confusion and makes the data easier to work with later.
Can I copy a pivot table and paste it as a regular table?
Yes. Select the entire pivot table, copy it, then right-click and choose Paste Special > Values. This converts it to a static table that you can edit like any other data. The downside is it will not update if your source data changes.
How do I delete a pivot table?
Right-click anywhere in the pivot table and choose Delete. If the pivot table is on its own sheet, you can also right-click the sheet tab at the bottom and choose Delete Sheet. Deleting a pivot table does not affect your original data.
Can I use a pivot table with data from multiple sheets?
Not directly. You need to combine the data into one sheet first. Copy all the data from each sheet into a single sheet, making sure the columns match, then build the pivot table from that combined data.