What is the CELL function?
=CELL(info_type, [reference])CELL returns information about a cell, such as its address, position, value or format. Write info_type as an English word in double quotes, like "address".
According to Microsoft, "type" returns "b" for a blank cell, "l" for a text constant and "v" for anything else. Click cells in the sheet above to check.
Arguments
- info_type
- "address", "row", "col", "contents", "type", "format", "width" and others.
- reference
- Optional, but Microsoft notes that without it the result depends on the currently selected cell and is unpredictable. It is best to give a cell.
CELL examples
Example 1. Address
=CELL("address", A3)"$A$3".
Example 2. Kind of value
=CELL("type", A4)A blank cell, so "b".
Example 3. Value
=CELL("contents", A2)The value in A2.
Common mistakes
Translating info_type
info_type is written in English. Microsoft notes that results can differ when files are shared with Excel in other languages.
Leaving out reference
The result may change whenever a different cell is selected.
FAQ
- Does it work in Excel for the web?
- According to Microsoft, Excel for the web supports only some info types.
- Just the row number?
- The ROW function is simpler.