Information

CELL Function in Excel

Returns information about the formatting, location, or contents of a cell.

Syntax

  • =CELL(info_type, [reference])

Arguments

  • info_type (required): Text value specifying what info to return
  • reference (optional): Cell to get info about (default: last changed cell)

Examples

  • =CELL("address", A1) - Get cell address - Result: $A$1
  • =CELL("col", B5) - Get column number - Result: 2

Defensive formulas with CELL

  • Use IS* functions inside IF to branch on blank, error, text, or number cells.
  • Prefer [IFERROR](/functions/iferror/) when you only need a fallback display value.
  • Error hub: [Fix formula errors](/guides/fix-excel-formula-errors/).

Common errors

  • info_type must be valid text like address, col, row, type, width

Use cases

  • Dynamic references
  • Cell analysis
  • Debugging formulas

Frequently asked questions

  • What info_type values can I use with CELL? Common values: "address" (cell reference), "col" (column number), "row" (row number), "type" (b=blank, l=label/text, v=value), "width" (column width), "format" (number format code), "filename" (full path), "contents" (cell value).
  • How do I get the current file path and name? Use =CELL("filename", A1) to get the full path like [Book1.xlsx]Sheet1. To extract just the filename: =MID(CELL("filename", A1), FIND("[", CELL("filename", A1))+1, FIND("]", CELL("filename", A1))-FIND("[", CELL("filename", A1))-1).
  • Why does CELL return old information? CELL is volatile but may not update immediately. It updates when the worksheet recalculates. Press Ctrl+Alt+F9 to force full recalculation. Also, CELL without a reference returns info about the last changed cell, which can be confusing.

Editorial review

  • Reviewed by Excel.Directory Editorial Team. Updated May 2026.