CELL function. Get various information about the cell.(Microsoft Excel)

Japanese version.

Retrieve various information such as the format and lock status of the specified cell.

This function is not available online.

How it works

=CELL(info_type,reference)
ArgumentOmissionExplanation
info_typeRequired argument.
Details to follow.
referenceTarget cell.

info_type

address

Gets the top-left address of the range of cells specified.

The result is an absolute reference.

col

Retrieves the top-left-most column number of a given cell range.

However, the COLUMN function is better.

color

If it is a negative number, it is set to 1 if the format changes the character color, otherwise it is set to 0.

contents

Returns the value of a cell.

There is no need to use this function.

filename

The location where the file was saved and the sheet name of the target cell.

If not saved in a file, it will be blank.

format

Returns the set format.

Returns a specific code.

FormatResult
GeneralG
0F0
#,##0,0
0.00F2
#,##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+00S2
# ?/?
# ??/??
G
m/d/yy
m/d/yy h:mm
mm/dd/yy
D4
d-mmm-yy
dd-mmm-yy
D1
d-mmm
dd-mmm
D2
mmm-yyD3
mm/ddD5
h:mm AM/PMD7
h:mm:ss AM/PMD6
h:mmD9
h:mm:ssD8

parentheses

The result is 1 if the cell is formatted with positive values or all values enclosed in parentheses (), or 0 if the cell is not formatted.

It is not often used.

protect

If the cell is locked, the value is "1"; otherwise, it is "0".

row

Retrieves the top-left-most row number of a given cell range.

However, the COLUMN function is better.

type

The type of input value.

TypeResult
Blankb
Textl
Othersv

The following functions are better: ISBLANK, ISTEXT, ISNUMBER, ISLOGICAL.

width

Gets how many characters wide the cell is in standard font.

---

Links

Microsoft Excel Functions Information