How to Create a Pivot Table in Excel Step by Step
Learn how to pivot table data in Excel step by step, from clean headers and a full data range to Rows, Columns, and Values, plus prep for PDF tables.
If you have a long list of sales, expenses, or survey responses and need totals broken down by region, month, or product, a pivot table is usually the quickest way to get there. Many people try to answer these questions with manual sorting or long chains of formulas, which are slow to build and easy to break when rows change. Knowing how to pivot table data gives you a summary that you can rebuild in seconds.
This guide is for anyone who has a spreadsheet of records and wants a clear summary without rewriting the source. It covers the checks to run before you start, the steps from raw data to a finished table, and how to confirm the numbers are right. It also covers a common starting point: data that arrives as a PDF table, which you can export to Excel with the OmniDoc desktop client before building the pivot.
How to pivot table in Excel? The short answer
Make sure your data is a clean block with a header row, select the full range, insert a pivot table on a new sheet, and then drag fields into Rows, Columns, and Values until the summary shows what you need.
| Your situation | What to do | Why |
|---|---|---|
| Data is already in a spreadsheet | Select the full range, including the header row, and start a pivot table | Excel uses the headers as field names |
| Data is a PDF table | Export the table to Excel with the OmniDoc desktop client, then clean the columns | A pivot table needs a spreadsheet source, not a PDF page |
| Data is a scanned PDF | Run OCR in the PDF editor, then check the recognized numbers before exporting | Scanned pages are images until the text is recognized |
| Data has blank rows or merged cells | Unmerge cells and fill gaps before building the table | Blank or merged cells create false categories |
| You want a summary by month and product | Put Month in Rows, Product in Columns, and the amount in Values | Each area controls one part of the layout |
Before you start
Five checks take a few minutes and prevent most of the errors people run into later.
- Put clear headers in the top row. Each column needs one short, unique name, because the pivot table uses those names as field names. Two columns both called "Amount" will confuse the field list.
- Remove blank rows and subtotals inside the data. A subtotal row has a label like "Total" in a category column, so the pivot table will treat it as another category and double-count your numbers.
- Make formats consistent. Dates should be real dates and numbers should be numbers. A number stored as text can be counted instead of summed, or left out of totals entirely.
- Keep every row in one continuous block. If your data has gaps or a separate table on the same sheet, the pivot table may stop early. If you plan to add rows later, convert the range to a table so it expands on its own.
- Prepare PDF data before it goes into Excel. If your numbers come from a PDF, export them to a spreadsheet first, then review the column splits. Exports can merge or split columns in ways you need to fix by hand.
Building a pivot table in Excel, step by step
- Open the spreadsheet with your data and check the header row. Confirm each column has one clear name. Fixing headers now is faster than renaming fields after the table is built.
- Click any cell inside the data. Excel will usually detect the full block. If it selects only part of the range, select the data manually, starting with the header row and ending with the last record.
- Start the pivot table command from the insert options and confirm the range. Choose to place the pivot table on a new worksheet. This keeps your source data untouched and gives the summary room to grow.
- Drag a category field into Rows. Suppose you have a Region column. Each unique region becomes a row label, and Excel groups every matching record under it.
- Drag a second category into Columns. For example, drag Quarter into Columns. This creates a grid, so each cell shows the value for one region in one quarter.
- Drag a numeric field into Values. Drag a field such as Revenue into Values. Numeric fields are usually summed by default, while text fields are counted, so check the calculation after you drop the field.
- Adjust filters and formatting. If you need to narrow the view to one year or one salesperson, drag that field into the Filters area. Then format the numbers so totals are easy to read.
- Refresh after you change the source. If you edit records or add rows, refresh the pivot table so it reflects the new data. Otherwise the summary keeps showing the old values.
Check the result
A pivot table can look finished even when a category is missing or a column was misread. Run these checks once the table is built.
| Check | How to see it | If it's wrong |
|---|---|---|
| Grand total matches the source | Add up the source column with a plain sum formula and compare it with the pivot's grand total | The range probably misses rows; reselect the data and refresh |
| Each category appears once | Scan the row labels for near-duplicates such as "NY" and "New York" | Standardize the spelling in the source, then refresh |
| Values use the right calculation | Open the settings for the value field and confirm it's set to sum, count, or average as intended | Change the calculation type for that field |
| No stray blank group | Look for a "(blank)" row or column | Fill or delete blank cells in the source, then refresh |
| PDF-based numbers match the original | Compare a few rows with the PDF page | Recheck OCR results and column splits in the exported file |
Machine translation and OCR can make mistakes, especially with small digits, currency symbols, and tables with thin borders. Verify any figure that matters to a decision against the original document before you share the summary.
❓ FAQ
1. What is a pivot table used for?
A pivot table groups records by one or more categories and summarizes a number for each group. Common uses include totals by region, averages by department, and counts of responses by answer.
2. Why does my pivot table show a count instead of a sum?
Excel often counts a field when it contains any text or blank cells. Check that the column holds real numbers, then change the value field's calculation to sum.
3. Do I need to change my original data to build a pivot table?
No. The pivot table reads from your source range and stores the summary separately. You only need to edit the source when something is wrong, and then refresh the pivot.
4. What should I look for in a free pivot table tutorial?
Look for a tutorial that uses sample data you can download, shows each step with a screenshot or clear description, and mentions how to refresh the table. Good tutorials also explain common errors such as blank rows or text-formatted numbers.
📝 Summary
Building a pivot table takes clean headers, a complete data range, and a few drag-and-drop choices in Rows, Columns, and Values. If your numbers start in a PDF, export them to Excel first and check the columns before you build anything. Learning how to pivot table data this way gives you summaries you can trust and refresh whenever the source changes.


