MSBA-171 · Lesson 6 of 12 · 21 min

Excel tables

▶ Video coming soon A video version of this lesson is on the way.

By October the season bookings sheet had more than 400 rows, and every week someone added bookings below the last row and forgot to copy the formulas down, or added them below the total row so the total missed them. On the sixth Tuesday Dagny converted the list into an Excel table. "This one command fixes half our problems," she said. The exam's third domain, worth 15 to 20 percent, is about tables: creating and formatting them, modifying them, and filtering and sorting their data. This lesson covers the first two; lesson 7 covers sorting and filtering.

A range versus a table

A range is just cells. A table (in older versions, a "list") is a range that Excel manages as a single object with a name, a header row, its own formatting and its own behaviour. The difference shows as soon as you add data:

BehaviourPlain rangeExcel table
Typing in the row belowJust a new row of cellsThe table expands to include it, with formatting and formulas
A formula in one rowMust be copied down manuallyBecomes a calculated column that fills automatically
Headings when scrollingDisappear unless panes are frozenReplace the column letters while the active cell is in the table
Filter buttonsMust be turned onOn by default in the header row
Banded rowsManual formattingA table style option
TotalsTyped formulas that may miss rowsA total row that always covers the whole column
ReferencesCell addresses such as E2:E400Structured references such as Bookings[Fee]

Creating a table

Click any cell in the data and choose Insert > Table (Ctrl+T) or Home > Format as Table, which also lets you pick a style first. The Create Table dialog shows the range Excel detected and a check box, My table has headers. Leave it checked when the first row holds headings; if you clear it, Excel adds headings named Column1, Column2 and so on. Select OK.

For Excel to detect the range correctly, the data should have one heading row, no completely blank rows or columns inside it, and no merged cells. Teo's first attempt picked up only half the list because a blank row separated the summer bookings from the autumn ones; he deleted the blank row and tried again.

The new table gets a default name, such as Table1. Rename it straight away: click inside the table and, on the contextual Table Design tab, type a new name in the Table Name box at the far left, then press Enter. Table names follow the same rules as range names (lesson 5): no spaces, starting with a letter or underscore. Teo named the table Bookings.

A table named Bookings with the columns Event, Package, Guests and Fee, a blue header row with filter buttons, banded rows and a grey total row at the bottom. A caption shows the structured references SUM of Bookings Fee and at-sign Guests times 85.
The parts of an Excel table and two structured references.

Table styles

The Table Styles gallery on the Table Design tab has Light, Medium and Dark styles in each theme colour. Point to a style to preview it and click to apply it. Right-click a style for Set As Default or Duplicate, or use New Table Style at the bottom of the gallery to design your own, element by element. Table styles use the workbook theme, so changing the theme recolours the table.

If cells already had fill colours or borders before you made the table, that direct formatting stays on top of the table style, which can make the table look patchy. Clear the old formatting first, or choose Clear at the bottom of the Table Styles gallery and reapply a style. Teo cleared the old yellow highlights from the bookings list so the banded style showed evenly.

Table Style Options

Beside the gallery, the Table Style Options group has check boxes that turn parts of the style on and off. The exam asks you to "configure table style options", and every option is a check box:

OptionEffect
Header RowShows or hides the heading row
Total RowAdds a row of totals at the bottom
Banded RowsAlternating shading on rows
First ColumnSpecial formatting for the first column
Last ColumnSpecial formatting for the last column
Banded ColumnsAlternating shading on columns
Filter ButtonShows or hides the arrows in the header row

Rosalind wanted the client column to stand out, so Teo turned on First Column; he turned off Banded Columns, which made a wide table look striped.

Adding and removing rows and columns

Tables grow by themselves when you type immediately below or to the right of them: type a booking in the first blank row under the table and press Enter, and the table expands to include it. Press Tab in the last cell of the last row to add a new row. Drag the resize handle, the small triangle at the lower-right corner, to expand or shrink the table. Table Design > Resize Table lets you type the new range.

To insert inside the table, right-click a cell and choose Insert > Table Rows Above or Table Columns to the Left. To delete, right-click and choose Delete > Table Rows or Table Columns. These commands affect only the table, not the whole worksheet row, which matters when other data sits beside the table. Home > Cells > Insert and Delete have the same table-specific choices when the active cell is in a table.

If Excel expands a table when you did not want it to, the AutoCorrect Options button that appears offers Undo Table AutoExpansion. The setting itself lives in File > Options > Proofing > AutoCorrect Options > AutoFormat As You Type, under Include new rows and columns in table.

Calculated columns

Type a formula in any cell of an empty column inside a table, press Enter, and Excel fills the formula down the whole column. This is a calculated column. Teo added a column headed Per guest and typed a formula dividing the fee by the guest count; Excel filled it for all 412 bookings and, from then on, for every new booking too. If you need one row to differ, type over it and Excel marks the inconsistency with a small green triangle; the AutoCorrect Options button can then overwrite the whole column with the new formula or stop creating calculated columns.

Structured references

When you click cells in a table while writing a formula, Excel writes structured references instead of addresses. They use the table name and column names, and they adjust automatically as the table grows:

Structured references. The at sign means "this row"; brackets enclose column names; special items such as #Totals pick parts of the table.
=[@Fee]/[@Guests]                     this row's Fee divided by this row's Guests
=SUM(Bookings[Fee])                   the whole Fee column of the Bookings table
=AVERAGE(Bookings[Guests])             average guests across all bookings
=COUNTA(Bookings[Client])              number of bookings
=Bookings[@[Event date]]-TODAY()       days until this row's event (column name with a space)
=SUM(Bookings[[#Totals],[Fee]])        the Fee value in the total row

The parts of a structured reference are the table name, the column specifier in square brackets, and optionally a special item specifier: #All (the whole table including headers and totals), #Data (the data rows), #Headers, #Totals, and @ for this row. A column name containing spaces or special characters gets an extra pair of brackets. Lesson 8 compares structured references with ordinary relative and absolute references.

Structured references make formulas outside the table read clearly too. On the Summary sheet, Dagny's total of all fees became =SUM(Bookings[Fee]) instead of =SUM(Bookings!E2:E413), and when the table grew to 430 rows the formula needed no change.

The total row

Check Total Row in Table Style Options, or press Ctrl+Shift+T, and Excel adds a row labelled Total at the bottom of the table. By default the last column shows a sum. Click any cell in the total row to get a drop-down of calculations: None, Average, Count, Count Numbers, Max, Min, Sum, StdDev, Var and More Functions. Excel builds each one with the SUBTOTAL function, which calculates only the rows currently visible, so when you filter the table the totals change to match the filter.

The formulas Excel writes in a total row. The first argument picks the calculation.
=SUBTOTAL(109,[Fee])        Sum of visible rows (109 = SUM ignoring hidden rows)
=SUBTOTAL(101,[Guests])     Average of visible rows
=SUBTOTAL(103,[Client])     Count of visible non-blank cells

Worked problem

Configuring a total row

An exam task says: "Add a total row to the Bookings table. Display the average of the Guests column and the sum of the Fee column."

Show solution
  1. Click inside the table and check Total Row on the Table Design tab.
  2. Click the total row cell under Guests, open its drop-down and choose Average.
  3. Click the total row cell under Fee and make sure Sum is selected.

Answer: The total row now shows the average guests and total fees, and both update when the table is filtered. You can also type your own formula in a total row cell, or text such as a label, in the first column.

Converting a table to a range

Sometimes you need a plain range again, for example to share a sheet with someone whose system cannot handle tables, or because a feature you need does not work inside tables. Click in the table and choose Table Design > Tools > Convert to Range, then confirm. The cells keep the table style's formatting as ordinary formatting, filter buttons disappear, and structured references in formulas turn into ordinary cell references. The exam asks for this by name: "convert tables to cell ranges".

The Tools group also has Summarize with PivotTable, Remove Duplicates and Insert Slicer. Remove Duplicates asks which columns to compare and deletes rows that repeat them, keeping the first; Teo used it on the imported enquiries to remove three double submissions. Slicers are buttons for filtering, covered with filters in lesson 7.

Tables, names and other features

A table name is a defined name, so it appears in the Name Manager (with a table icon) and in the Name Box drop-down. A name that refers to a table column, such as one with Refers to set to Lists[Venue], grows when the table grows, so drop-down lists based on it stay current. Charts based on a table also expand as rows are added, which lesson 11 uses. Tables imported by Power Query (lesson 3) are ordinary tables in every way described here.

Two limits are worth knowing. A table cannot contain merged cells, and you cannot create a table where another table already is. Some older features, such as shared workbooks and the Subtotal command on the Data tab, do not work with tables; convert to a range first if you need them.

Accessibility and tables

Screen readers announce a table's header row and its name when someone enters it, which makes a properly built table far more usable than a formatted range. The Accessibility Checker (lesson 2) warns about tables with no header row and suggests giving tables meaningful names. Keep the Header Row option on, avoid blank heading cells, and give each table a name that says what it holds.

Table names and summary formulas

Once the bookings were in a table, Dagny's summary sheet used nothing but structured references. Here is how its formulas changed:

Summary cellBefore (range)After (table)
Total feesSUM of Bookings!E2:E413SUM of Bookings[Fee]
Number of bookingsCOUNTA of Bookings!A2:A413COUNTA of Bookings[Client]
Average guestsAVERAGE of Bookings!C2:C413AVERAGE of Bookings[Guests]
Largest eventMAX of Bookings!C2:C413MAX of Bookings[Guests]

Every "before" formula would have missed new bookings added below row 413; every "after" formula includes them automatically. The structured versions are also self-explanatory to someone opening the workbook for the first time.

When a table is not the right choice

Tables suit lists: one row per item, one column per attribute, a single heading row. They suit layouts less well. The quote sheet itself, with a title, client details, a block of line items and a total area, stayed an ordinary range with a small table for the line items only. A monthly grid with months across the top and venues down the side can be a table, but its headings must be text, so Excel converts a heading such as 2026 into text and warns you. Dagny's test was simple: if you would sort it or filter it, make it a table.

Duplicating a table structure

To start next season's bookings list with the same columns, formulas and style, copy the whole sheet (lesson 2) and delete the data rows, leaving one row; the table keeps its calculated columns, total row and style. Excel renames the copied table automatically, for example Bookings2, so rename it to something meaningful such as Bookings2027.

Common mistakes

  • MistakeLeaving blank rows inside the data before creating a table.

    InsteadRemove blank rows and columns so Excel detects the whole range.

  • MistakeKeeping the default name Table1.

    InsteadRename the table in Table Design > Table Name, without spaces.

  • MistakeTyping totals under the table as ordinary formulas.

    InsteadTurn on the Total Row; its SUBTOTAL formulas cover the whole column and respect filters.

  • MistakeDeleting whole worksheet rows to remove a table row when other data sits beside it.

    InsteadUse Delete > Table Rows, which affects only the table.

  • MistakeExpecting Convert to Range to remove the table formatting.

    InsteadThe style's formatting stays as direct formatting; clear it separately if needed.

Summary and key terms

  • Insert > Table (Ctrl+T) turns a range into a named table with a header row, filters and banding.
  • Table Design holds the table name, styles, style options, Resize Table and Convert to Range.
  • Tables expand automatically; calculated columns fill formulas down every row.
  • Structured references use table and column names, such as Bookings[Fee] and [@Guests].
  • The total row uses SUBTOTAL, so its results follow filters.
Excel table
A named, managed range with a header row, styles, automatic expansion and structured references.
Table style
A theme-based format for the whole table, chosen from the Table Styles gallery.
Calculated column
A table column whose formula fills automatically for every row.
Structured reference
A reference using table and column names instead of cell addresses.
Total row
An optional last row with drop-down calculations built on SUBTOTAL.
Resize handle
The triangle at a table's lower-right corner, dragged to change its range.
Convert to Range
The command that turns a table back into ordinary cells.

Practice problems

Work each problem on paper first, then reveal the answer to check.

  1. What shortcut creates a table from the current data?

    Show answer

    Ctrl+T.

  2. Where do you rename a table?

    Show answer

    Table Design > Properties > Table Name.

  3. Which function does the total row use, and why does it matter?

    Show answer

    SUBTOTAL; it calculates only visible rows, so totals follow filters.

  4. What does the at sign mean in a structured reference such as [@Fee]?

    Show answer

    The value in the same row of the Fee column.

  5. How do you turn a table back into a normal range?

    Show answer

    Table Design > Convert to Range.

Lesson quiz · 5 questions

Score 60% or more to complete this lesson.

Take the quiz