Excel functions / Information
CELL function
Tells you something about a cell: its address, row, column, contents, number format or the type of value in it.
Syntax
=CELL(info_type, [reference])
Arguments
info_type: What to report, in quotes: "address", "row", "col", "contents", "type", "format" or "filename".reference(optional): The cell to report on. Left out, it is the cell the formula is in.
When to use it
CELL reports a fact about a cell: its address, its row or column, what it holds, its number format, or the kind of value in it. The first argument says which fact, in quotes.
In Excel, CELL("filename") is the usual way to get the name of the workbook or the sheet into a cell.
Examples
The address of a cell, as text
A B C D 1 Item Price 2 Pen 1.2 $B$2 In D2:
=CELL("address", B2)→ $B$2Whether a cell holds text or a value
A B C D 1 Item Price 2 Pen 1.2 l In D2:
=CELL("type", A2)→ ll is for label (text), v for a value, b for blank.
The row a cell is on
A B C D 1 Item Price 2 Pen 1.2 2 In D2:
=CELL("row", B2)→ 2
Common mistakes
- The first argument without quotes. It is text: CELL("row", A1), not CELL(row, A1).
- No reference. Without a second argument, Excel reports on whichever cell was changed last, which is rarely what is wanted. Always give the cell.
- A file that has not been saved. CELL("filename") is empty until the workbook has been saved once.
CELL in other languages
Excel shows function names in its own language. In these languages it also puts a semicolon between arguments where English has a comma.
- Czech: POLÍČKO
- Danish: CELLE
- Dutch: CEL
- Finnish: SOLU
- French: CELLULE
- German: ZELLE
- Hungarian: CELLA
- Italian: CELLA
- Norwegian: CELLE
- Polish: KOMÓRKA
- Portuguese (Portugal): CÉL
- Russian: ЯЧЕЙКА
- Spanish: CELDA
- Swedish: CELL
- Turkish: HÜCRE
Related functions
- ADDRESS: Builds a cell address as text from a row number and a column number.
- ROW: The row number of a reference (or of the current cell).
- COLUMN: The column number of a reference (A = 1).
- TYPE: A number for the kind of value: 1 number, 2 text, 4 TRUE or FALSE, 16 error, 64 array.
- FORMULATEXT: Shows the formula in a cell as text.
- SHEET: The number of a sheet, counting the tabs from the left: 1 for the first.