Tables in worksheets and cell references

<< Click to Display Table of Contents >>

Tables in worksheets and cell references

As described in the introduction of the section Tables in worksheets, the ribbon command Insert | Table enables you to create "tables in worksheets". Here, you will learn more about the specifics of using cell references to the cells in such a table.

Apart from the usual cell references, tables and their contents can also be addressed using names and special identifiers:

Using names

Names in cell references to table contents can be used as follows:

Addressing tables by their name

When you use the name of a table in a cell reference, it represents the entire table (with all of its cells, except the column headings and the total row).
Example:
=SUM(Table3) returns the sum of all cells in the table named "Table3".

Tip: The name of a table can be changed via the dialog box of the command Properties table_prop_icon on the contextual ribbon tab Table.

Addressing table columns by their column heading

To address a single column of a table in a cell reference, enter the name of the table, followed by the column heading of the desired column enclosed in square brackets.
Example:
=SUM(Table3[Spring]) returns the sum of all cells in the column with the column heading "Spring" in the table named "Table3".

Addressing multiple adjacent table columns

You can also address multiple adjacent table columns. To do so, use the notation [[FirstColumn]:[LastColumn]].
Example:
=SUM(Table3[[Spring]:[Autumn]]) returns the sum of all cells in the columns "Spring" to "Autumn" in the table.

Addressing multiple non-adjacent table columns

To address multiple non-adjacent table columns, separate them with a comma instead of a colon.
Example:
=SUM(Table3[Summer],Table3[Winter]) returns the sum of the columns "Summer" and "Winter".
Note that the name of the table must be specified before each column.

Using special identifiers

In addition to names, cell references to table contents can also use special identifiers that represent a certain component of this table.

The identifier must be enclosed within square brackets when entered after the table name:

For example, Table3[#Totals] is a cell reference to all cells in the total row of the table named "Table3".

The following identifiers are available:

#All:

This represents the entire table including column headings and total row, for example, Table3[#All].

#Data:

This represents all cells in the table that contain the actual data. These are all cells except the column headings and the total row.

#Headers:

This represents the cells in the header row of the table (the row containing the column headings).

#Totals:

This represents the cells in the total row of the table. (Note: If the total row is disabled, the cell reference will return a #REF! error value.)

@[ColumnName]:

This represents the cell that is in the same row of the specified column. This is especially useful for calculations within a table.
If, for example, you use a cell reference like [@Spring] in a cell in a table, it represents the cell that is in the same row of the column with the column heading "Spring".
Example:
=SUM([@[Spring]:[Winter]]) returns the sum of those values in the columns "Spring" to "Winter" that are in the same row as the cell in which this calculation was entered.

Note: PlanMaker does not distinguish between uppercase and lowercase letters in identifiers.