keepcalculator

06 Numbers and Powers

Structured Reference Syntax Examples

Card No. 06·53273 · Updated · Standard formula, shown below

Average pace 5.00 min/km
Average speed
12.00 km/h
Result
Finish time
50 min
You entered
Distance
10 km
You entered
You enter
Finish time, Distance
You get
Average pace, Average speed
Rounding
2 dp

Structured reference syntax is the special notation Excel uses to refer to tables and their columns, like =SUM(Table1[Amount]) instead of =SUM(C2:C100). This article explains the syntax with concrete examples and shows you how to build formulas that automatically adjust when you add or remove rows.

Formula

The average pace is the total time divided by the distance:

pace = t / d

where t is the finish time in minutes and d is the distance in kilometers. The average speed is the distance divided by the time in hours:

speed = d / (t / 60)

since 60 minutes equal one hour.

Worked Example

Using the default values, you ran 10 km in 50 minutes. The pace is:

50 / 10 = 5.00 min/km

The speed is:

10 / (50 / 60) = 10 / 0.8333 = 12.00 km/h

So the calculator shows a pace of 5:00 per kilometer and a speed of 12 km/h.

What Is a Structured Reference?

When you insert a table in Excel (Ctrl+T), Excel names it automatically (Table1, Table2, etc.) and gives each column a header name. A structured reference uses those names in formulas. For example, if your table is named Sales and has a column Revenue, you can write =SUM(Sales[Revenue]) instead of =SUM(D2:D100). The main benefit is that the reference automatically expands when you add rows, so your totals stay correct without manual updates.

Basic Syntax Components

A structured reference has three main parts:

  • Table name – the name of the table, like Sales or Employees.
  • Column specifier – the column header in square brackets, like [Revenue].
  • Item specifier – optional, for special parts like totals or headers, e.g., [#Totals].

Here are common examples:

  • =SUM(Sales[Revenue]) – sums the entire Revenue column.
  • =Sales[@Revenue] – gets the Revenue value from the current row (when used inside the same table).
  • =SUM(Sales[[#Totals],[Revenue]]) – sums the Totals row of the Revenue column (if a totals row exists).
  • =COUNT(Sales[Quantity]) – counts numeric entries in the Quantity column.

Using the @ (At) Symbol for Current Row

The @ symbol refers to the same row as the formula. If you type a formula in a column of a table, =Sales[@Revenue] returns the Revenue value from that row. This is especially useful for calculated columns. For example, if you have a table with Price and Quantity, you can add a column Total with =[@Price]*[@Quantity]. The @ makes the formula relative to each row, so it works for every row automatically.

Referencing Entire Rows and Columns

You can reference an entire row or column using special specifiers:

  • Sales[#All] – the entire table, including headers and totals.
  • Sales[#Data] – only the data rows (no headers or totals).
  • Sales[#Headers] – only the header row.
  • Sales[#Totals] – only the totals row (if enabled).
  • Sales[[#Headers],[#Data]] – both headers and data.

These are handy when you need to reference the whole table or a specific part in a formula. For example, =COUNTA(Sales[#Headers]) counts the number of columns.

Common Mistakes and How to Avoid Them

One frequent error is forgetting the square brackets around column names that contain spaces or special characters. For instance, Sales[Unit Price] is correct, but Sales[Unit Price] without brackets fails. Another mistake is using structured references outside the table’s scope – they work fine, but you must include the table name. Also, when you rename a column, Excel updates all references automatically, but if you have a typo, you’ll get a #REF! error. Always check that the table name and column headers match exactly.

Another issue: structured references do not work in array formulas the same way as regular references. If you use them with functions that expect a range, like SUMPRODUCT, you may need to wrap them properly. For example, =SUMPRODUCT(Sales[Qty], Sales[Price]) works, but =SUMPRODUCT(Sales[Qty]*Sales[Price]) also works because the multiplication creates an array.

When to Use Structured References vs. Regular References

Use structured references when you want your formulas to be self-documenting and resilient to row additions. They are ideal for dashboards, reports, and any data that changes frequently. Regular references (like A1:B10) are simpler for one-off calculations but require manual updates when the range changes. Structured references also make formulas easier to read, especially for other people who open your workbook. However, they can be slower in very large datasets because Excel recalculates the entire table reference. For most everyday use, the clarity outweighs the performance cost.

Limitations and Alternatives

Structured references have a few limitations. They only work with Excel Tables, not with ordinary ranges. They also cannot be used in some dynamic array functions like SEQUENCE directly, though you can combine them. If you need to reference a table from another sheet, you still use the table name, but you may need to include the sheet name if there are conflicts. As an alternative, you can use named ranges, which are more flexible but lack the automatic expansion. For most users, structured references are the best choice for table data.

Frequently Asked Questions

How do I create a structured reference?

Select your data and press Ctrl+T to create a table. Then, in any formula, start typing the table name and Excel will show a list of columns. You can also click on the table cells to insert references automatically.

Why does my structured reference show #REF! error?

This usually happens when the table name or column header is misspelled, or when the table has been deleted. Check the formula bar and ensure the table name and headers match exactly. If you renamed a column, Excel updates references automatically, but if you manually typed a wrong name, you’ll get this error.

Can I use structured references in conditional formatting?

Yes, you can use structured references in conditional formatting rules, but you need to write the formula as if it applies to the first cell of the range. For example, to highlight rows where Revenue > 1000, select the data range, create a new rule with formula =Sales[@Revenue]>1000 and apply it to the range.

Do structured references work in Google Sheets?

No, Google Sheets does not support Excel’s structured reference syntax. Instead, it uses named ranges and the FILTER function. You can create named ranges in Google Sheets to achieve similar readability, but they do not auto-expand like Excel tables.

How do I reference a table on another sheet?

Just use the table name in the formula, and Excel will find it regardless of the sheet. If you have multiple tables with the same name, you may need to qualify it with the sheet name, like =SUM(Sheet2!Sales[Revenue]).

Related

Formula used
in t | Finish time | min | 50 | 0
in d | Distance | km | 10 | 0 | 100000
out pace | Average pace | min/km | t / d | 2
out speed | Average speed | km/h | d / (t / 60) | 2

Each line is one input (in, sel, list) or one result (out: label, unit, formula, decimals). How the calculators work

Method: the standard formula for this calculation, rounded as each result states. See how the calculators work or report an error.

More cards in this drawer

The whole Numbers and Powers drawer →