CELL Function in Google Sheets: Formula, Examples & Troubleshooting
Inspect cell addresses, values, types, sheet names, and formatting with CELL in Google Sheets. Understand top-left references and character-based width.
Verification status: See the evidence and test scope described in this guide. How formula examples are checked
Quick answer: CELL retrieves a specified kind of information about a referenced cell. For example, =CELL("row",C2) returns 2, while =CELL("contents",C2) returns C2’s value.
Verification: NOT_TESTED_IN_GOOGLE_SHEETS. Google’s CELL reference was reviewed October 17, 2026. Expected outputs below are independently derived from its documented contract; formatting-dependent values were not measured in a live sheet.
Syntax and information types
=CELL(info_type, reference)
Both arguments appear as required in Google’s signature. info_type selects the property; reference identifies the cell. Quote a literal selector such as "row", or refer to a cell holding the selector text.
Google documents these selectors:
| Selector | Information requested |
|---|---|
address |
Absolute-reference text for the top-left cell |
col |
Column number |
color |
1 for a format that displays negative numbers in red; otherwise 0 |
contents |
Top-left cell’s value |
prefix |
Marker based on horizontal text alignment |
row |
Top-left cell’s row number |
type |
b for blank, l for plain text, v for other data |
width |
Column width measured in default-size zero-character widths |
sheet |
Name of the referenced cell’s sheet |
These meanings, including their formatting distinctions, come from Google’s CELL reference. They are not a promise that selectors from another spreadsheet product are supported.
Example: build an input inspection panel
On a sheet named Inputs, enter:
| Cell | Entry |
|---|---|
| A1 | Item |
| B1 | Status |
| C1 | Amount |
| A2 | Packaging |
| B2 | Ready |
| C2 | 250 |
| C3 | Leave genuinely empty |
Place the following formulas in a separate area of the same sheet:
| Formula | Expected result |
|---|---|
=CELL("address",C2) |
$C$2 |
=CELL("row",C2) |
2 |
=CELL("col",C2) |
3 |
=CELL("contents",C2) |
250 |
=CELL("type",B2) |
l |
=CELL("type",C2) |
v |
=CELL("type",C3) |
b |
=CELL("sheet",C2) |
Inputs |
Do not type the instruction “Leave genuinely empty” into C3; it describes the setup. If you type those words, the cell contains text and the expected type is no longer blank.
The address result is text describing a location. The contents result is the value from that location. Those are different outputs even though the formulas refer to the same C2.
Range references: check which cell is being inspected
For selectors that explicitly inspect the top-left cell, a range does not produce a record for every member. For example:
=CELL("contents",C2:D5)
The expected result is 250 because C2 is the top-left cell. =CELL("row",C2:D5) returns 2, not the range’s height. Use individual references when you need a per-cell audit, and use a range-size function for a row or column count.
This is especially important when checking a large imported block. One successful contents or type check does not establish that every other cell contains the same kind of data.
Advanced use: explain a selected input’s location
An audit panel can combine a sheet label with its address:
=CELL("sheet",C2)&" / "&CELL("address",C2)
For the setup above, the expected label is Inputs / $C$2. Put the inspected contents in an adjacent cell with =CELL("contents",C2) so a reviewer sees both the origin and the current amount.
This is a human-readable label, not a constructed cross-sheet formula. Sheet names containing spaces or punctuation need additional syntax considerations if you later build formula text. Do not confuse an audit label with a universally valid reference expression.
To compare a numeric constant with a calculated value, enter =125+125 in C4. Both C2 and C4 have expected type v, and both have contents 250. CELL’s type code describes the data category; it does not tell you whether the amount came from a formula. Use FORMULATEXT when the task is to inspect formula text, with its own input rules.
Formatting-specific traps
color is not a general background-color or font-color lookup. Google’s documented test concerns number formatting that makes negative values red. A red-filled cell is not, by itself, evidence that CELL should return 1.
For prefix, Google’s alignment markers are a single quote for left-aligned text, a double quote for right-aligned text, a caret for centered text, and an empty result for other cases. These are metadata markers; the function is not reading a punctuation character from the cell’s contents.
For width, the unit is a default-size zero character, not pixels. Do not compare the returned number directly with a pixel width from a column-resize dialog. No fixed conversion factor is asserted here.
Troubleshooting and availability
- An unfamiliar selector fails: Check the nine documented selectors before borrowing a formula from another product. Exact error tokens for unsupported selectors were not established.
- A range gives one answer: Check whether the selector explicitly uses the top-left cell.
- The type is not a formula flag: Numeric constants and numeric formula results are both values for the example above.
- A formatting-only change seems stale: The reviewed CELL page does not establish a complete recalculation contract for every formatting change. Verify the current result in your sheet instead of treating a cached display as a formatting audit.
Current Google documentation establishes support on the review date. Introduction and retirement or last-working versions were not established. No Excel selector compatibility is assumed.
See ROW, COLUMN, ADDRESS, and ISNUMBER for related location and value checks.
First-party reference reviewed October 17, 2026: CELL.