CELL function

CELL returns information about a cell's location, contents, or formatting, such as its address, row, column, or data type.

=CELL(info_type, [reference])

Generate a CELL formula

Describe what you need. The generator will reach for CELL where CELL is the right tool, and tell you when it is not.

How to get a better answer
  • Name your columns by letter and by header: "column F (Net Value)" beats "the amount column".
  • State every condition, including the negatives — "not cancelled" changes the formula's shape.
  • Say where the data starts if it is not row 1, and whether it will grow.
  • Check the settings above match your spreadsheet: the wrong argument separator is a syntax error on your machine.

Arguments

How CELL reads its arguments
info_typerequiredreferenceoptionalCELL
ArgumentRequiredDescription
info_typeRequiredRequired text specifying which property to return: 'address', 'row', 'col', 'type', 'contents', 'format', 'protect', or others. Invalid types trigger #VALUE!.
referenceOptionalOptional; the cell or range to examine. If omitted, CELL refers to the current cell. If the reference is deleted or closed, returns #REF!.

Returns

A text string or number identifying the cell's attribute (address, row/column number, data type code, or format).

Availability

Excel: All · Google Sheets: Supported

Worked examples

1. Identify the cell address of a maintenance record

VehicleOdometerService DateCostGarage
Tesla-1452302024-01-15185Bay A
Toyota-2621052024-02-03245Bay B
=CELL("address",B2)

Result: $B$2

CELL returns the address of cell B2 in absolute reference format. This is useful for tracking which cell you're reading from in larger maintenance logs, especially when auditing or documenting record locations.

2. Extract the row number of a service entry

VehicleOdometerService DateCostGarage
Tesla-1452302024-01-15185Bay A
Toyota-2621052024-02-03245Bay B
Ford-3389502024-01-20320Bay C
=CELL("row",A4)

Result: 4

CELL returns 4, the row number where Ford-3's service record is stored. Combine this with COLUMN to pinpoint a record's exact position in the sheet, useful for generating audit trails or linking to adjacent data.

3. Detect the data type in a cost cell

VehicleOdometerService DateCostGarage
Tesla-1452302024-01-15185Bay A
Toyota-2621052024-02-03245Bay B
=CELL("type",D2)

Result: v

CELL returns 'v' (value), confirming D2 contains numeric data (185), not text. If a cost were accidentally stored as text '185', CELL would return 't' instead, alerting you to data quality issues in your maintenance log.

Common errors

Which CELL error are you seeing?
CELL returned an error#VALUE!
Use a valid text info_type: 'address', 'row', 'col', 'type', 'contents', 'format', 'protect', 'prefix', or 'parentheses'.
#REF!
Verify the reference still exists; if a column was deleted, update the formula to point to the current location of your data.
#VALUE!
Pass a proper cell reference like A1, B4:B10, or an address constructed by ADDRESS(); do not pass text strings or numbers as the reference.
ErrorWhy it happensHow to fix it
#VALUE!info_type is a number, or the text does not match a recognized info type keyword.Use a valid text info_type: 'address', 'row', 'col', 'type', 'contents', 'format', 'protect', 'prefix', or 'parentheses'.
#REF!The reference argument points to a deleted cell, a closed workbook, or an invalid cell range.Verify the reference still exists; if a column was deleted, update the formula to point to the current location of your data.
#VALUE!The reference is provided as a text string or value instead of a valid cell reference.Pass a proper cell reference like A1, B4:B10, or an address constructed by ADDRESS(); do not pass text strings or numbers as the reference.

Tips and when to use something else

  • Use ROW() or COLUMN() for a simpler way to extract row and column numbers—CELL('row',...) and CELL('col',...) work identically but require more typing.
  • Use TYPE() instead of CELL('type',...) if you only need to distinguish numbers from text; TYPE is shorter and makes your intent clearer.
  • Use ADDRESS() if you want to construct a cell reference from row and column numbers, rather than CELL('address',...) to extract an existing reference.
  • CELL shines when auditing or linking to metadata; if you need only the row number, reach for ROW() to keep formulas readable.

Frequently asked questions

What do 'v', 't', and 'b' mean when I use CELL('type',...)?
'v' means the cell contains a numeric value; 't' means text; 'b' means blank. These codes help you programmatically detect data types in your maintenance logs. For example, if a cost field returns 't', you know it was entered as text and may need conversion.
Why does CELL('address',...) return $B$2 instead of B2?
CELL returns absolute references by default (with dollar signs). If you need a relative reference, use ADDRESS() with the absolute parameter set to 4 (relative), or manually strip the dollar signs with SUBSTITUTE().
Can I use CELL to check if a cell is empty?
Yes, use CELL('type',A1)='b', but ISBLANK(A1) is simpler and more readable. ISBLANK is the standard choice for checking empty cells in maintenance logs or any dataset.
What happens if I omit the reference argument in CELL?
CELL applies to the current cell—the cell containing the formula itself. This is useful in dynamic sheets where you want to report metadata about the cell you're working in, though it's rarely needed in typical fleet maintenance tracking.

Need a different formula?

The full generator is not scoped to one function — describe any spreadsheet problem and it will pick.

Open the formula generator

Reviewed 2026-09-17