How to use excel cell function

Version in which excel CELL function can work:

Excel CELL function will work in Excel for Office 365 Excel for Office 365 for Mac Excel 2016 Excel 2013 Excel 2010 Excel 2007 Excel 2016 for Mac Excel for Mac 2011 Excel Online Excel for iPad Excel for iPhone Excel for Android tablets Excel for Android phones Excel Starter 2010.

About CELL function in excel:

CELL function can be used to retrieve the information about the cell like, formatting, location, content of the cell etc. The full list of details which we can get is listed below.

Syntax for Excel CELL Function:

=CELL (info_type, [reference])

Parameters:

Info_type [Required]. A text value that specifies what type of cell information you want to retrieve. It can be:

“address”

“col”

“color”

“contents”

“filename”

“format”

“parentheses”

“prefix”

“protect”

“row”

“type”

“width”

reference [optional]: The reference from which to extract information.

Using CELL function:

The CELL function can be used to get different information about the cell. Info_type should be always be mentioned in double quote.

When the reference refers to more than one cell, it will consider top left cell.

excel cell function

Refer below Info_types which can be used in CELL function.

Info type function
“address” Address of the cell. If the cell refers to a range, it is the first cell in the range.
“col” Column number of the cell.
“color” Returns 1 if the color is a negative value; else it returns 0.
“contents” Contents of the upper-left cell.
“filename” Filename of the file that contains reference.
“format” Number format of the cell. See example formats below.
“parentheses” Returns 1 if the cell is formatted with parentheses; else , it returns 0.
“prefix” Label prefix for the cell.
* Returns a single quote (‘) if the cell is left-aligned.
.* Returns a double quote (“) if the cell is right-aligned.
*  Returns a caret (^) if the cell is center-aligned.
.* Returns a back slash (\) if the cell is fill-aligned.
* Returns an empty text value for all others.
“protect” Returns 1 if the cell is locked. Returns 0 if the cell is not locked.
“row” Row number of the cell.
“type” Returns “b” if the cell is empty.
Returns “l” if the cell contains a text constant.
Returns “v” for all others.
“width” Column width of the cell, rounded to the nearest integer.

See the Following list of format codes returned by the formula:

Format meaning The CELL function returns
General “G”
0 “F0”
#,##0 “,0”
0.00 “F2”
#,##0.00 “,2”
$#,##0_);($#,##0) “C0”
$#,##0_);[Red]($#,##0) “C0-“
$#,##0.00_);($#,##0.00) “C2”
$#,##0.00_);[Red]($#,##0.00) “C2-“
0% “P0”
0.00% “P2”
0.00E+00 “S2”
# ?/? or # ??/?? “G”
m/d/yy or m/d/yy h:mm or mm/dd/yy “D4”
d-mmm-yy or dd-mmm-yy “D1”
d-mmm or dd-mmm “D2”
mmm-yy “D3”
mm/dd “D5”
h:mm AM/PM “D7”
h:mm:ss AM/PM “D6”
h:mm “D9”
h:mm:ss “D8”

Leave a Comment