ID EN
#Information

CELL

Excel Functions

Get information about a cell

Syntax

EXCEL
=CELL(info_type, [reference])

Arguments

Parameter Description
info_type The type of information to return about the reference.
reference [optional] The reference from which to extract information.

Return Value

A text value

Details

Use the CELL function to return a wide range of information about a reference. The type of information returned is given asinfo_type, which must be enclosed in double quotes (""). CELL can return a cell's address, the filename and path for a workbook, and information about the formatting used in the cell. See below for a full list of info types and format codes. The CELL function takes two arguments: info_type and reference. Info_type is a text string that indicates the type of information requested. See the table below for a full list of info types. Reference is a cell reference. Reference is typically a single cell. If reference refers to more than one cell, CELL returns information about the first cell in reference. For certain kinds of information (like filename), the cell address used

Examples

Examples

For example, to get the column number for C10:

EXCEL
=CELL("col", C10) // returns 3
Examples

To get the address of A1 as text:

EXCEL
=CELL("address",A1) // returns "$A$1"
Examples

To get the full path and workbook name for the current worksheet:

EXCEL
=CELL("filename",A1) // path + filename
Examples

CELL can also return format code information. For example, if A1 contains the number 100 with the currency number format applied, the CELL function wi

EXCEL
=CELL("format",A1) // returns "C2"
Examples

When requesting the info_type "format" or "parentheses", a set of empty parentheses "()" is appended to the format returned if the number format uses

EXCEL
=CELL("format",A1) // returns "F0()"

See Also

ADDRESS INFO