The CELL returns the information about the cell.
This function can be useful for analyzing data and obtaining additional information about cells in a spreadsheet.
Syntax
CELL(info_type, [reference])
Argument |
Description |
Permitted values |
|---|---|---|
info_type |
Type of information requested |
"address": Absolute cell reference. "col": Column number. "contents": Data from the top left cell of a range. "filename": Full path and name. "prefix": Shows how the cell data is aligned: •A single quote if left. •A double quote if right. •Caret ^ if center. •Backslash \ if justified. •Nothing if the cell is empty. "protect": Shows if the cell is locked for changes: 1 if yes, and 0 if not. "row": Row number. "type": Type of data: •b: Empty cell. •l: Text. •v: Other. |
[reference] |
(optional) The cell for which information is required. By default, it takes the value of the cell in which the formula is located |
Cell name |
Examples of use
Obtaining the address of cell A1:
=CELL("address", A1)
The expression will return the result: $A$1.
Retrieving the path of the document and sheet containing cell A1:
=CELL("filename", A1)
Result: full path to the file and sheet name.
If you want to retrieve information about the current cell, you can use:
=CELL("address")
Result: the address of the current cell containing the formula.
Notes
The CELL function can return different values depending on the specified info_type argument.