CELL function - Zoho Sheet - Help Guide

CELL

Returns information about the address, format, or content of a given cell.

 

Syntax

 

CELL(info_type; cell_ref )

info_type: Text string that determines which information to return. E.g. "WIDTH"

cell_ref: The reference of the cell whose information you want. E.g. A4

 

info_type

Description

COL

CELL() returns the column number of the referenced cell.

ROW

CELL() returns the row number of the referenced cell.

SHEET

CELL() returns the sheet number of the referenced cell.

ADDRESS

CELL() returns the absolute address of the referenced cell as text.

COORD

CELL() returns the complete cell address in Lotus (TM) notation as text.

CONTENTS

CELL() returns the contents of the upper-left most cell in a given range.

TYPE

CELL() returns text that indicates the type of cell contents in the referenced cell.
b (blank) = an empty cell
l (label)   = text, or the result of a formula as text
v (value) = a number, or the result of a formula as a number

WIDTH

CELL() returns the column width of the referenced cell. The unit is the number of zeros (0) that fit into the column in the default font and size.

PREFIX

CELL() returns text that indicates the alignment of the referenced cell.
'  = align left or left-justified
"  = align right
^  = align center

FORMAT

CELL() returns text that indicates the number format in the referenced cell.
,  = number with thousands separator
F = number without thousands separator
C = currency format
S = exponential representation, for example 1.234+E56
P = percentage
In the above formats, the number of decimal places after the decimal separator is given as a number. Example: the number format 1,000.0 returns 1, and the number format 10.000% returns P3.
D1 = MMM-D-YY, MM-D-YY and similar formats
D2 = DD-MM
D3 = MM-YY
D4 = DD-MM-YYYY HH:MM:SS
D5 = MM-DD
D6 = HH:MM:SS AM/PM
D7 = HH:MM AM/PM
D8 = HH:MM:SS
D9 = HH:MM
G   = All other formats
- (minus sign) at the end = number format colors negative values
() (brackets) at the end = number format contains brackets for positive values

COLOR

CELL() returns 1 if the cell has number format to color negative values, and 0 otherwise.

PARENTHESES

CELL() returns 1 if the format code contains an opening bracket '(', and 0 otherwise.

 

Examples  

 

Formula

Result

=CELL("ADDRESS";A2)

$A$2

=CELL("CONTENTS";A2:A4)

500

=CELL("WIDTH";A4)

100


Get a hands-on experience of the function in the embedded range below. 



Possible Errors

 

Errors

Meaning

#N/A!

  • The function could not find the value it was asked to look for. Commonly occurs in VLOOKUP and similar functions.

#NAME!

  • The function name is incorrect or invalid.

  • The given defined name (if any) is invalid.

  • There is a typo in the defined name used in the function.

  • Double quotes are missing for text values in the function.

  • Colon missing in a cell range reference.

#VALUE!

  • The given argument's data type is incorrect or invalid.
    For example, the function =DATE(A1:A3) will return a #VALUE error when a text value is present in the range.

#REF!

  • The given cell reference is incorrect or invalid. This error may occur when a cell/range has been deleted, moved, or pasted over.

 

Similar Functions