Function · Information
Excel CELL function
The Excel CELL function returns one fact about a cell. CELL("address", B1) is $B$1. The function is volatile, and omitting the reference uses whichever cell changed last.
Syntax =CELL(info_type, [reference])
=CELL("address",B1)Arguments
| Name | Required | What to pass |
|---|---|---|
| info_type | Required | What to return, in quotes. "address" is the absolute address. "col" and "row" are the column and row numbers. "contents" is the value. Other types include "filename", "format", and "width". |
| reference | Optional | The cell to inspect. If omitted, Excel uses the cell that changed most recently. Pass it. |
Examples
The address of the city cell
=CELL("address",B1)Result $B$1
| A | B | |
|---|---|---|
| 1 | City | Austin |
| 2 | Address | $B$1 |
CELL returns one detail about a cell. CELL("address", B1) is the text $B$1 when B1 holds Austin. CELL("col", B1) is 2. CELL("contents", B1) is Austin. The address form is close to the ADDRESS function, with two differences: CELL reads an existing cell, and CELL is volatile, so it recalculates more often than an ordinary formula.
Leave the reference off and Excel reports whichever cell was changed most recently. That result moves while you edit. Pass the reference. The “format” type returns a code that depends on the cell’s number format and can differ by locale. “filename” is blank until the workbook has been saved. For a formula’s text, use FORMULATEXT. CELL does not return the formula.