EXCEL & GOOGLE SHEETS TIPS · LESSON 6
How to Make a Pivot Table in Excel and Google Sheets (Step by Step)
A pivot table turns a long list of transactions into a summary, such as spending by category and month, without a single formula. This lesson builds the same pivot table from 34 real business expenses in Excel and in Google Sheets, explains Rows, Columns and Values, groups dates by month and fixes the usual problems: Count instead of Sum, new rows not showing, dates that won't group.
THE SHORT ANSWER
Insert, then drag three fields
Click any cell in the data → Insert → PivotTable → New Worksheet → OK → in the field list tick Category (goes to Rows) and Amount (goes to Values as Sum) → drag Date or Months to Columns.
Select the data → Insert → Pivot table → New sheet → Create → in the editor: Rows → Add → Category, Columns → Add → Date - Month, Values → Add → Amount (SUM).
Both give the table below: five categories down the side, September to November across the top, totals in the corner. Grand total $1,972.03, identical in both apps. Download the example file: the Transactions sheet with all 34 expenses and the finished PivotTable on the Pivot sheet, built in Excel. Click any cell of the pivot to open its field list, or build your own next to it from the same data. It also opens in Google Sheets.
BEFORE YOU START
Prepare the data: one header row, one record per row
- Every column has a header (Date, Description, Category, Paid with, Amount). An empty header cell stops Excel with "The PivotTable field name is not valid".
- One transaction per row, no subtotal rows and no blank rows in the middle.
- Real dates and real numbers. Dates typed as text won't group by month; amounts stored as text are counted, not summed.
- Categories spelled the same way every time. "Software" and "software " become two rows. A drop-down list (lesson 1) prevents this.
EXCEL
How to make a pivot table in Excel
- Click any cell inside the data, then open the Insert tab and click PivotTable. (On Windows the button may open a small menu: choose From Table/Range.)
- Check the range and the destination. Excel guesses the whole table (here Transactions!$A$1:$E$35). Keep New Worksheet and click OK.
- Tick the fields. In the PivotTable Fields pane, tick Category (text fields go to Rows) and Amount (numbers go to Values as "Sum of Amount").
- Add the months. Tick Date. Excel groups dates automatically and adds Months (Date), often with Days and Date as well, all in Rows. That gives a long list of single days.
- Clean up the date fields. Untick Days (Date), drag Date out of the Rows box, and drag Months (Date) from Rows to Columns. Category stays in Rows. The table becomes the compact category-by-month grid shown at the top.
- Format the numbers. Right-click a number → Number Format… → Currency, so the whole Values area keeps the format after refreshes.
GOOGLE SHEETS
How to make a pivot table in Google Sheets
- Select the data including the header row (A1:E35), then Insert → Pivot table.
- Confirm the range (Sheet4!A1:E35 in the screenshot; it shows your own sheet name, Transactions in the example file), keep New sheet and click Create. The prompt box at the top is optional; you don't need it.
- Rows → Add → Category.
- Columns → Add → Date - Month. Sheets offers ready-made date parts for date columns. If your version shows only "Date", add it, then right-click any date in the pivot → Create pivot date group → Month (or Year-Month for several years).
- Values → Add → Amount. "Summarize by" is SUM by default for numbers.
HOW IT READS
Rows, Columns, Values and Filters
| Area | What it does | Try this with the example |
|---|---|---|
| Rows | One row per distinct value. | Category → 5 rows. Add Description under it to see what is inside each category. |
| Columns | One column per distinct value. | Months → Sep, Oct, Nov. Put Paid with here instead to compare card vs checking. |
| Values | The number in each cell: Sum, Count, Average, Max… | Amount as Sum. Change to Count to see how many purchases, or Average for the typical ticket. |
| Filters | Limits the data without changing the layout. | Paid with = Business card to see only card spending. |
Percent of total: Excel: right-click a value → Show Values As → % of Grand Total. Google Sheets: in the Values card, Show as → % of grand total. Advertising is 31% of all expenses in the example.
NEW DATA
Refresh the pivot when you add rows
- Excel doesn't update a pivot by itself. After editing the data, click inside the pivot → PivotTable Analyze → Refresh (Windows shortcut Alt+F5).
- New rows below the range are ignored until you widen it: PivotTable Analyze → Change Data Source. Better: turn the data into a table first (Ctrl+T on Windows, Insert → Table on any version) and build the pivot from the table; it grows with every new row, and Refresh picks it up.
- Google Sheets recalculates automatically, but also only inside its range. Use an open-ended range such as
Transactions!A1:E(with your sheet name) in the editor so new rows are included.
TROUBLESHOOTING
Pivot table problems and fixes
| What you see | Why | Fix |
|---|---|---|
| "Count of Amount" instead of Sum | The Amount column has blanks or text, so Excel defaults to Count. | Values → Value Field Settings → Sum; then fix the text numbers. |
| "The PivotTable field name is not valid" | A header cell is empty or the range includes an empty column. | Name every column; select only the data. |
| New transactions are missing | The pivot wasn't refreshed, or the rows are outside its range. | Refresh; build from a table (Excel) or an open range (Sheets). |
| Dates won't group (Group is greyed out) | At least one date is text, or a cell is empty. | Convert text dates (DATEVALUE or Data → Text to Columns), fill the gaps, refresh. |
| The same category appears twice | Different spelling or a trailing space. | Clean the column with TRIM or Find & Replace, then refresh. |
| A "(blank)" row | Rows with an empty Category. | Fill them in, or filter (blank) out with the row label filter. |
| Numbers lose their format after refresh | Cells were formatted directly. | Format through Value Field Settings → Number Format (Excel). |
FAQ
Pivot table questions
How do I make a pivot table in Excel?
Click a cell in your data, choose Insert → PivotTable → New Worksheet → OK, then tick the fields in the PivotTable Fields pane: a text field goes to Rows, a number field goes to Values as a Sum. Drag fields between Rows, Columns, Values and Filters to change the layout.
How do I make a pivot table in Google Sheets?
Select the data, choose Insert → Pivot table → Create, then use the editor: Rows → Add, Columns → Add, Values → Add. Google Sheets updates the pivot when the data changes.
How do I group dates by month in a pivot table?
In Excel, dates are often grouped automatically; otherwise right-click a date in the pivot → Group → Months. In Google Sheets, add the "Date - Month" field or right-click a date → Create pivot date group → Month.
Why does my pivot table show Count instead of Sum?
The value column contains blank or text cells. Change the summary to Sum in Value Field Settings (Excel) or Summarize by (Sheets), and convert any numbers stored as text.
How do I refresh a pivot table?
In Excel, click inside it and choose PivotTable Analyze → Refresh, or Alt+F5 on Windows. Google Sheets refreshes automatically, as long as new rows are inside the source range.
Pivot table or SUMIFS?
A pivot table is fastest for exploring and one-off summaries. SUMIFS formulas (see lesson 4) suit a fixed report or dashboard that must update without refreshing.