Description Returns the specified type of information about a specified cell. If no cell is specified, the function will return information about the cell the function was entered in.
Syntax CELL (info_type [, cell])
Argument | Description | ||
---|---|---|---|
info_type | The type of information you want about cell. It must be text, surrounded by quotation marks. The following are the valid entries and the types of information they return, listed in alphabetical order: | ||
"across" | Returns 1 if the cell is formatted for long text centered across several cells. Otherwise, it returns 0. | ||
"address" | Returns an absolute reference to cell. | ||
"backgroundcolor" | Returns the index number of the fill color of cell. | ||
"bold" | Returns 1 if the font in cell is bold. Otherwise, it returns 0. | ||
"bottomborder" | Returns a code corresponding to the type of the bottom border of cell. The codes are: 0 for none, 1 for thin, 2 for medium, 3 for dashed, 4 for dotted, 5 for thick, 6 for double, and 7 for hairline. | ||
"bottombordercolor" | Returns the index number of the color of cell's bottom border. | ||
"col" | Returns the column number of cell. The result is the same as the result of the COLUMN function. | ||
"color" | Returns #N/A. | ||
"contents" | Returns the contents of cell. | ||
"coord" | Returns an absolute reference to cell, including the book and sheet names if they are different from the cell containing this function. | ||
"datatype" | Returns a code corresponding to the type of data found in cell. The codes are: b for a blank cell; v for a number, a formula that returns a number, a formula that returns a logical value, or a formula that returns a date/time value; l for text or a formula that returns text; e for any error value except #N/A; and n for the #N/A error value. | ||
"filedate" | Returns #N/A. | ||
"filename" | Returns #N/A. | ||
"fontface" | Returns the name of the font in cell. | ||
"fontsize" | Returns the size of the font in cell, in points. | ||
"format" | Returns #N/A. | ||
"formulatype" | Returns a code corresponding to the type of data and/or formula found in cell. The codes are: b for a blank cell, v for a number, fv for a formula that returns a number, l for text, fl for a formula that returns text, e for any error value except #N/A, fe for a formula that returns any error value except #N/A, n for the #N/A error value, and fn for a formula that returns the #N/A error value. | ||
"halign" | Returns a code corresponding to cell's horizontal alignment type. The codes are: 0 for general, 1 for left, 2 for centered, 3 for right, 4 for fill (the fill string is repeated to fill the width of cell), 5 for justified, and 6 for centered across cells. | ||
"height" | Returns the row height of cell's row, in points. | ||
"italic" | Returns 1 if the font in cell is italic. Otherwise, it returns 0. | ||
"leftborder" | Returns a code corresponding to the type of the left border of cell. The codes are: 0 for none, 1 for thin, 2 for medium, 3 for dashed, 4 for dotted, 5 for thick, 6 for double, and 7 for hairline. | ||
"leftbordercolor" | Returns the index number of the color of cell's left border. | ||
"orientation" | Returns #N/A. | ||
"parentheses" | Returns #N/A. | ||
"pattern" | Returns the index number of cell's fill pattern, or 0 if cell has no fill pattern. | ||
"patterncolor" | Returns the index number of the foreground color used in cell's fill pattern. | ||
"prefix" | Returns a code corresponding to cell's alignment. The codes are: single tic (') for left-justified text, quotation marks (") for right-justified text, caret (^) for centered text, and backslash (\) for fill-aligned text. Otherwise it returns empty text (" "). | ||
"protect" | Returns #N/A. | ||
"rightborder" | Returns a code corresponding to the type of the right border of cell. The codes are: 0 for none, 1 for thin, 2 for medium, 3 for dashed, 4 for dotted, 5 for thick, 6 for double, and 7 for hairline. | ||
"rightbordercolor" | Returns the index number of the color of cell's right border. | ||
"rotation" | Returns #N/A. | ||
"row" | Returns the row number of cell. | ||
"sheet" | Returns a letter corresponding to the position of cell's worksheet: A is the leftmost worksheet, B is the next worksheet, etc. | ||
"sheetname" | Returns the name of cell's worksheet, if it is named; otherwise, returns a letter corresponding to the position of cell's worksheet: A is the leftmost worksheet, B is the next worksheet, etc. | ||
"textcolor" | Returns the index number of cell's text color. Note that number formats that display text in specific colors may override this setting. | ||
"topborder" | Returns a code corresponding to the type of the top border of cell. The codes are: 0 for none, 1 for thin, 2 for medium, 3 for dashed, 4 for dotted, 5 for thick, 6 for double, and 7 for hairline. | ||
"topbordercolor" | Returns the index number of the color of cell's top border. | ||
"type" | Returns b if cell is empty, l if cell contains text, and v if cell contains anything other than text. | ||
"underline" | Returns 1 if the font in cell is underlined. Otherwise, it returns 0. | ||
"valign" | Returns a code corresponding to cell's vertical alignment. The codes are: 0 for top, 1 for center, 2 for bottom. | ||
"width" | Returns the column width of cell, truncated to an integer. Each unit of column width is equal to the width of one character in the default font size. | ||
"wrap" | Returns 1 if the text in cell wraps, 0 if it doesn't. | ||
cell | The cell you want information about. If you enter a range reference, CELL will return information about the top left cell in the range. If you omit this argument, the function will return information about the cell the function is entered in. |
Remarks This function is included in Formula One for Java in order to be compatible with Excel, which in turn included it in order to be compatible with other worksheet formats, notably Lotus 1-2-3.
Developers will find it more efficient to extract this type of information using Java direct calls.
Example This function returns $D$57:
CELL("address",D57)
See Also INFO