All versions
Information
The Excel CELL function returns information about a cell’s formatting, location, or contents — address, row, column, file path, number format, and more.
Quick answer: the workbook’s file path:
=CELL("filename", A1) // full path, file, and sheet name
Syntax
=CELL(info_type, [reference])
| Argument | Description | |
|---|---|---|
info_type | Required | What to report, as text: "address", "row", "col", "contents", "format", "type", "filename", "width", "color", "parentheses", "prefix", "protect". |
reference | Optional | The cell to inspect (defaults to the cell that last changed). |
How to use it
The most popular use is "filename" to pull the workbook path and sheet name (then carve out the sheet with MID/FIND). Other common types: "address", "row", "col", "contents", "format". CELL is volatile — it recalculates on every change — so use it sparingly in big models.
Try it: interactive demo
Live demo
Pick an input and watch the formula and result update.
Result:
Practice workbook
Download the free CELL practice workbook
Every example on this page, ready to open in Excel — plus practice challenges with answers on a separate tab. No sign-up required.
Frequently asked questions
How do I get just the sheet name?
=MID(CELL("filename",A1), FIND("]",CELL("filename",A1))+1, 255) — but the file must be saved first.
Why does "filename" return empty?
The workbook hasn’t been saved yet; CELL needs a saved path.
Is CELL volatile?
Yes — it recalculates constantly, which can slow large workbooks.
CELL vs newer functions?
For row/column use ROW/COLUMN; for sheet names SHEET. CELL stays useful for format and filename info.
Master functions like this in one day
This page covers one function. Our Excel Formulas and Functions class covers the 30 that matter most — live, hands-on, taught by professionals in Dallas–Fort Worth, Houston, Austin, Oklahoma City, Denver, or online.
See the Formulas & Functions Class