Sub topic 7
Naming a Table and Using It in Formulas
This chapter assumes that you can select ranges in Google Sheets, write simple formulas such as SUM, and read A1 notation such as C2:C4. A table is a named data object built from a range. Its name and column names let formulas describe the data instead of depending on cell coordinates.
Why table names matter
A fixed range describes specific cells. For example, this formula adds the values currently in cells C2 through C4:
=SUM(C2:C4)If you add an order in row 5, the formula still refers only to C2:C4. You must edit the formula to include the new row.
A table gives the data a name and gives each column a name. After you name the table Orders, you can refer to its Amount column like this:
=SUM(Orders[Amount])This is a structured reference. A structured reference identifies a table or one of its columns by name. When the table grows, the reference continues to represent the table column.
How a table name connects to a formula
The table name is the part before the brackets. The column name is inside the brackets.
A table reference has three useful properties:
- It is easier to read than a coordinate such as
C2:C100. - It keeps working when rows are added to the table.
- It follows the table column if the column moves or the table is edited.
The reference must use the exact table name and column name. Spaces in a column name remain inside the brackets.
Rename a table
When you create a table, Google Sheets assigns it a default name. Rename it before writing formulas that will be reused or shared.
- Click any cell inside the table.
- Open the table menu or table properties panel.
- Find the table name.
- Enter a descriptive name such as
Orders,Inventory, orSupportTickets. - Confirm the change.
Choose names that describe the table’s contents. Avoid names that look like cell references, such as A1, and avoid names that are difficult to distinguish from worksheet names.
If you rename a table after using it in formulas, Google Sheets updates references to the renamed table. Check important formulas after renaming, especially formulas copied from another spreadsheet.
Use table columns in formulas
Suppose the Orders table has these columns:
| Order ID | Customer | Order Date | Amount | Paid |
|---|---|---|---|---|
| 1001 | Acme | 2026-01-05 | 250 | TRUE |
To total the Amount column, use:
=SUM(Orders[Amount])To count paid orders, use:
=COUNTIF(Orders[Paid], TRUE)The first argument of COUNTIF is the table column. The second argument is the condition. In this example, TRUE matches checked or true values in the Paid column.
You can combine table references with other functions. For example, this formula calculates the average order amount:
=AVERAGE(Orders[Amount])A table reference can also be used in a conditional calculation:
=SUMIF(Orders[Customer], "Acme", Orders[Amount])This adds values in Orders[Amount] only for rows where Orders[Customer] is Acme.
Add rows without rewriting formulas
When you enter a new record directly below the table, Google Sheets can expand the table to include the new row. Formulas that refer to the table column then include the new value automatically.
Check that the new row is directly adjacent to the table and that its values match the expected column types. A blank row, merged cell, or unrelated value can prevent the table from expanding as expected.
A structured reference does not fix incorrect data. If an Amount value is stored as text, SUM may not treat it as a number. If a date is entered as plain text, date-based calculations may not work correctly.
Common errors
- Wrong table name: Check spelling and capitalization in the table properties.
- Wrong column name: Make sure the name inside brackets matches the header.
- Missing table expansion: Confirm that the new row touches the table and contains values in the expected columns.
- Unexpected totals: Check for text values, blank rows, or duplicate records.
- Copied formulas: Verify that a copied formula still points to the intended table.
Exercise
The Orders table has an Amount column and a Paid column. Write one formula that totals all amounts and another that counts paid orders.
Show answer
Use =SUM(Orders[Amount]) for the total and =COUNTIF(Orders[Paid], TRUE) for the paid-order count.