Going Stellar

Home/Google Sheets reference

Google Sheets function · Info

CELL in Google Sheets: syntax and examples

CELL reports facts about one cell: where it is, what type of content it holds, what the content is. It is a small inspection tool, handy next to INDIRECT or in checks on imported data.

Syntax

CELL(info_type, reference)

Arguments

ArgumentTypeRequiredWhat it does
info_typestringyesWhat to report, such as "address", "row", "col", "contents" or "type".
referencecellyesThe cell to inspect.

Examples

The examples use this table, starting in A1:

ItemQty
Lamp12
Chair
53
=CELL("address", B2)

Result: $B$2

Absolute address of a cell, as text.

Run in a Google Sheet (English US locale) on .

=CELL("row", C4)

Result: 4

Row number of a cell.

Run in a Google Sheet (English US locale) on .

=CELL("col", C4)

Result: 3

Column number of a cell: C is 3.

Run in a Google Sheet (English US locale) on .

=CELL("contents", A2)

Result: Lamp

The value stored in the cell.

Run in a Google Sheet (English US locale) on .

=CELL("type", A2)

Result: l

Type of content: "l" for a text label, "v" for a value.

Run in a Google Sheet (English US locale) on .

Common errors

  • The info_type is text and must be quoted. A name Sheets does not know returns #VALUE!.
  • "address" returns an absolute reference with dollar signs, as text.
  • "type" gives "b" for a blank cell, "l" for text and "v" for anything else, numbers included.
  • Not every Excel info type works. CELL("filename", A1) returns #VALUE!, so test an info_type before copying it from an Excel file.

Compared with Excel

Excel has more info types, for example "filename", which returns #VALUE! in Google Sheets.

Sources

  1. CELL (Docs Editors Help)

Markdown version · All functions