
INDIRECT
The INDIRECT function returns the contents of a cell or range referenced by an address specified as a string value.
INDIRECT(addr-string, addr-style)
addr-string: A string value representing a cell address.
addr-style: An optional modal value specifying the address style.
A1 (TRUE, 1 or omitted): The address format should use letters for columns and numbers for rows.
R1C1 (FALSE): The address should use the R1C1 format, where R1 is the row number of a cell and C1 is the column number.
Notes
The given address can be a range reference, such as "A1:C5", not just a reference to a single cell. If used this way, INDIRECT returns an array that can be used as an argument to another function or directly read using the INDEX function. For example:
=SUM(INDIRECT("A1:C5", 1)) returns the sum of the values in the cells referenced by the addresses in cells A1 to C5.
Example |
---|
If cell A1 contains 99 and A20 contains A1: =INDIRECT(“A20”) returns 99, the contents of cell A1. |