Table cell references

Items in a WordprocessingML table are organized into rows and columns with the box formed by the intersection of a row and column being called a cell. Cells have names such as A1, A2, B1, B2, and so on, with the letter representing a column and the number representing a row. The cell at the top-left corner of each table is named A1. Column letters are not case-sensitive.

A cell reference shall be one of the following:

  • The name of a cell.

  • A comma-separated set of cell names.

  • A cell range where a colon (:) is used to separate the first and last cells in a designated range of cells that has a contiguous rectangular shape. Specifying a row or column's name only as the first and last cell in a range, selects that whole row or column, regardless of the number of rows and columns the table has now or might have in the future.

An expression inside a table's cell can have operands that are references to other cells in that table.

example:

A1 + B1

Returns the sum of the contents of cells A1 and B1.

SUM(A1,B2,A3)

Returns the sum of the contents of the list of cells.

SUM(B1:B3)

Returns the sum of the contents of all cells between B1 and B3, inclusive.

SUM(B:B)

Returns the sum of the contents of all cells in column B (even if new rows are added later).

SUM(A1:B2)

Returns the sum of the contents of all (four) cells in the rectangular grid delimited by A1 and B2, inclusive.

SUM(1:1,2:2)

Returns the sum of the contents of all cells in rows 1 and 2.

When used in a table cell, the functions taking a list argument can have a single argument of ABOVE, BELOW, LEFT, or RIGHT, spelled in any case combination. Such lists designate, respectively, all the cells above, below, to the left of, or to the right of that cell. However, the designated range terminates if a cell with blank or non-numeric contents is reached, except that if the first cell is blank, it is treated as containing 0.
example: : Given the following table:

12

=COUNT(BELOW)

10

2

20

=SUM(LEFT)

3

xxx

=AVERAGE(ABOVE)

40

AVERAGE(ABOVE) results in 2.5, the average of cells A4 and A3; COUNT(BELOW) results in 2, B2 and B3; and SUM(LEFT) results in 22, the sum of B3 and A3. ]

An expression used outside a table or in a cell of one table can refer to cells in a second table by making a bookmark to that second table and qualifying cell names in that table by their table name using the form

(tableBookmarkName cellReference)
example: