Skip to content

Add a total row and calculated columns to a table

Excel tables8 min

Builds on Turn a range into an Excel table.

A caterer in Raleigh keeps event bookings in a table. The owner wants totals at the bottom, and a column that prices each booking without anyone copying a formula down.

How it works

Tick Total Row on the Table Design tab (the Table tab on a Mac) and Excel adds a total row under the table. Each of its cells has a list: None, Average, Count, Count Numbers, Max, Min, Sum, StdDev, Var or More Functions. Count counts filled cells, so it works on names; Count Numbers counts numbers only. Each choice writes a SUBTOTAL formula, such as =SUBTOTAL(109,[Amount]), so the totals follow the table's filters.

A calculated column is one formula for a whole column. Type a formula in an empty column of the table, or in the column just right of it, and press Enter: Excel fills it into every row, and into each row added later. Click cells as you type and Excel writes references such as [@Guests], the Guests value in the same row, with a second pair of brackets when the name has a space, as in [@[Per head]]. To keep a formula in one cell only, undo the fill with the AutoCorrect Options button that appears beside it.

Example

The Bookings table has Guests and Per head columns. In the next empty column the owner types the heading Price, and this formula under it:

=[@Guests]*[@[Per head]]
Multiplies the Guests by the Per head price of the same row, in every row of the table.

Excel fills it down the whole column, and a booking added next week gets its price too.

Common mistakes

  • Count Numbers under a column of names shows 0. Pick Count.
  • The total row's Sum changes when you filter, since it adds only the rows on screen. For the whole table, use a formula such as =SUM(Bookings[Price]) outside it.
  • A number typed over a cell of a calculated column stops that row updating. Type the formula again to bring it back.
  • With the total row on, a row typed under it doesn't join the table. Press Tab in the last cell of the last row to add one.

In short

  • Total Row on the Table Design tab adds a total row; pick each column's total from its list.
  • Its totals follow the table's filters.
  • A formula typed in a table column fills the whole column, rows added later included.
  • [@Column] means the value in this row's Column, with extra brackets when the name has a space.

Practice

4 exercises · free, no account needed

Start practicing
  1. Not started

    1. Show the largest workshop and the revenue

    Table · easy

  2. Not started

    2. Add a line total to every order

    Table · medium

  3. Not started

    3. Count the attendees in the total row

    Table · medium

  4. Not started

    4. The total row after a filter

    Quiz · easy