The CELL function reports metadata about a cell — its address, column number, data type, or even the workbook’s file path — useful for dynamic labels, audits, and sheet-name tricks.
The example
Inspect a cell’s address, type, and column.
| A | B | |
|---|---|---|
| 1 | Info type | Result |
| 2 | "col" | 1 |
| 3 | "type" | v / l / b |
The formula
The formula:
How it works
How it works:
CELL(info_type, reference)returns a property of the referenced cell.- Common types:
"address","col","row","type"(v=value, l=label/text, b=blank),"contents","filename". CELL("filename", A1)returns the full path, sheet included — the basis of sheet-name extraction.- Omit the reference to report on the last cell that changed.
CELL is volatile — it recalculates on every change, which can slow large workbooks. And CELL("filename") returns an empty string until the workbook has been saved at least once. Save the file before relying on path-based formulas.
Try it: interactive demo
Pick an info type for a sample cell holding "Hello" at C5.
Variations
Cell address
As $A$1 text:
Sheet name
From filename:
Data type
v / l / b:
Pitfalls & errors
Volatile. CELL recalculates constantly; avoid sprinkling it across huge sheets.
filename needs a save. Returns "" until the workbook is saved to disk.
Quote the info type. The first argument is text — "col", not col.
Practice workbook
Frequently asked questions
What does the CELL function do in Excel?
How do I get the sheet name with CELL?
Why is CELL("filename") blank?
Stop fighting formulas. Learn them in a day.
This recipe is one of hundreds of real-world formulas we teach. Our Excel Formulas & Functions class covers lookups, logic, text, and dynamic arrays hands-on — live in Dallas–Fort Worth, Houston, Austin, Oklahoma City, Denver, or online.
See the Formulas & Functions Class