Lesson 13 / 1587%

Lesson 13

Excel Tables and Pivot Tables

28 min

Structure your data and create analysis reports in just a few clicks.

Definition

An Excel Table is a range of data converted into a structured object, with a name, column headers and automatic features (filters, expansion, copied-down formulas). APivotTable is an interactive report thatsummarizes a large amount of data by grouping rows and columns according to the criteria of your choice, and by calculating totals, averages or counts, without writing any formula.

Converting a range into an Excel Table

An Excel Table (with a capital T) is a feature that turns a simple range of cells into a structured object, with many automatic benefits: formatting, filters, automatic expansion of formulas, and column names that can be used in formulas.

Don't confuse this "Table" with a simple table of cells: an ordinary range is just a set of cells with no link between them, whereas an Excel Table knows where it starts, where it ends, what its columns are called and how to react when data is added to it. It is the foundation of a well-organized workbook.

create-table.txt
Select your data, then:
Insert > Table (or shortcut Ctrl + T)

A dialog box asks you to confirm the range and to specify whether your table has headers: always check this box if your first row contains the column titles. A new "Table Design" tab then appears in the ribbon whenever you click inside the table.

Tables in Excel

The concrete benefits of an Excel Table

  • Automatic expansion — adding a row or a column next to the table automatically includes it, with formatting and formulas copied down.
  • Structured references — formulas can use column names instead of references like A2, which are more readable.
  • Automatic filters — enabled as soon as the table is created, with no extra steps.
  • Total row — a checkbox adds a configurable total row at the bottom of the table.
  • Built-in formatting — table styles with banded rows are offered and are automatically reapplied to new rows.
structured-references.txt
If the table is called "Sales" with an "Amount" column:

=SUM(Sales[Amount])
instead of:
=SUM(D2:D157)

→ much more readable, and the reference adjusts automatically if the table grows

The table name can be changed in the Table Design tab, at the left of the ribbon. Choose a short and explicit name, without spaces (for example Salesor Customers), because it will be used in all your formulas. Inside the table, you can also refer to the cell of the column that is on the same row as your formula with the@ symbol.

row-references.txt
In a "Total" column of a table containing the "Price" and "Quantity" columns:

=[@Price]*[@Quantity]
→ multiplies the price and the quantity of the same row
→ the formula is automatically copied down to all the rows of the table

What is a PivotTable?

A PivotTable automatically summarizes large amounts of data along the axes of your choice, without writing any formula. It is Excel's most powerful analysis tool for turning hundreds of raw rows into a clear report in a few clicks.

Let's take a table of 500 sales with the columns region, product, month and amount. To find out how much each region sold, you would have to write one formula per region. With a PivotTable, you simply drag the "Region" field to one side and the "Amount" field to the other, and Excel instantly calculates all the totals. If you then want to see the results by month rather than by region, you just have to move a field: the report is rebuilt in a second.

PivotTables in Excel

Preparing the source data

A PivotTable is only reliable if the starting data is clean. Before creating one, check a few essential points.

  • A single header row — each column must have a title, with no duplicates or empty cells.
  • One row = one record — each row describes a sale, a customer or an order, with no intermediate total row.
  • No empty rows or columns — they interrupt the automatic detection of the range.
  • Consistent types — a column of amounts must contain only numbers, otherwise they will be counted rather than summed.

Creating a PivotTable

create-pivottable.txt
1. Click anywhere in your data table
2. Insert > PivotTable
3. Choose "New Worksheet"
4. In the pane that appears, drag your fields:
   - Rows: what you want to group (e.g. "Region")
   - Columns: a second grouping axis (e.g. "Month")
   - Values: what you want to calculate (e.g. Sum of "Amount")
   - Filters: a criterion to display only part of the data

The "PivotTable Fields" pane lists all the columns of your data. You can also simply check a field: Excel places it automatically, text fields in the rows and numeric fields in the values. The four areas can be changed at any time by drag and drop, without ever touching your original data.

PivotTables in Excel

Changing the type of calculation in the values

By default, a numeric field placed in "Values" uses the sum. Right-clicking the field, then "Value Field Settings", lets you choose another summary function.

  • Sum — total of the values in the group.
  • Average — average of the values in the group.
  • Count — number of rows in the group (useful even on a text column).
  • Min / Max — minimum or maximum value of the group.
  • % of Grand Total — displays each value as a percentage of the whole, very useful for a distribution analysis.

If an amount field displays "Count of Amount" instead of "Sum of Amount", it is almost always a sign that some cells in the column contain text or are empty: Excel then chooses counting. Fix the source data, then refresh the PivotTable.

Filtering and sorting in a PivotTable

A PivotTable can be filtered and sorted like an ordinary table: the arrows next to the row and column labels let you hide certain items or rank the results from largest to smallest. The "Filters" area of the pane offers a global filter, placed above the report, for example to display only a single year.

For more visual filtering, the "Insert Slicer" button on the PivotTable Analyze tab adds small clickable buttons: a click on "North" or on "2026" instantly filters the whole report. Slicers also work on an Excel Table.

Refreshing a PivotTable

Unlike a classic formula, a PivotTable does not update automaticallywhen the source data changes. You have to click "Refresh" (right-click the PivotTable, or the PivotTable Analyze tab) after any change to the raw data.

The Alt + F5 shortcut refreshes the selected PivotTable, and Ctrl + Alt + F5refreshes all those in the workbook. Remember to do it before presenting a report: an unrefreshed PivotTable can display outdated figures without any warning.

Best practice

Always build your PivotTable from an Excel Table (covered above) rather than a simple range: if you add rows later, the PivotTable's source expands automatically, without having to redefine the range manually.

You will then only need to refresh the PivotTable for it to take the new rows into account. Without a Table, a fixed range forgets the data added after the report was created, which silently skews the totals.

Common mistakes to avoid

  • Forgetting to refresh — the PivotTable then displays old figures without warning.
  • Starting from a range instead of a Table — rows added later are not taken into account.
  • Leaving empty cells in the headers — Excel refuses to create the PivotTable or renames the fields in odd ways.
  • Typing inside the PivotTable — the report's values are calculated: to change them, edit the source data, not the PivotTable.
  • Mixing text and numbers — a mixed column is counted instead of summed.

Exercise

Turn a sales table (at least 20 rows, with a region column, a product column and an amount column) into an Excel Table, then create a PivotTable that shows the total sales by region. Then rename your Excel Table "Sales" and calculate the grand total with a structured reference.

Going further

Add the product as columns of your PivotTable to cross region and product, then change the calculation from "Sum" to "% of Grand Total" to see the distribution as a percentage. Finally, add a row to your Excel Table, refresh the PivotTable and check that the new sale does appear in the report.