Excel Function

Excel CELL function

Get information about any cell — its format, its address, its contents type — without inspecting it manually.

CELL returns specific information about a cell — its formatting, its address, whether it's protected, what type of data it contains, and more. It's most useful for building dynamic references, troubleshooting formatting issues, and building smart audit formulas.

Syntax

CELL(info_type, [reference])
ArgumentWhat it means
info_type requiredA text string specifying what information to return. See table below.
reference optionalThe cell to get information about. If omitted, returns info about the last changed cell.

Common info_type values

info_typeReturns
"address"Absolute cell reference as text, e.g. "$A$1"
"col"Column number of the cell
"row"Row number of the cell
"type""b" = blank, "l" = label (text), "v" = value (number)
"format"Text code representing the cell's number format
"filename"Full path and filename of the workbook
"protect"1 if the cell is locked, 0 if not
"width"Column width rounded to nearest integer

Examples

=CELL("address", B5) -- Returns "$B$5" =CELL("type", A2) -- Returns "v" if A2 contains a number, "l" if text, "b" if blank =CELL("filename", A1) -- Returns the full file path and sheet name -- useful for footer references =CELL("row", A1) -- Returns 1
💡 Get the current sheet name

Combine CELL with MID and FIND to extract just the sheet name: =MID(CELL("filename",A1),FIND("]",CELL("filename",A1))+1,255)

Does CELL update automatically?
Not always — CELL is not fully volatile in all versions of Excel. If the result seems stale, press F9 to force recalculation.
What is the difference between CELL("type") and the IS functions?
CELL("type") returns a text code ("b", "l", or "v"). The IS functions (ISNUMBER, ISTEXT, ISBLANK) return TRUE/FALSE and are more useful inside IF formulas because they work directly as conditions.

Practice CELL for real

Type it in a live spreadsheet, get instant feedback. No videos, no downloads.

Start practising free →