CELL
Description
Returns information about the address, column, row, type, width, or height of a cell, or
general workbook information. If you omit the
reference
argument, the
function is volatile. We recommend always specifying the
reference
argument. Syntax
CELL(
info_type
, [
reference
])
- info_type: The type of cell information you want to obtain. Possible values are:
- address: The reference of the first cell in reference, as text.
- col: The column number of the cell in the reference.
- row: The row number of the cell in the reference.
- type: A text value corresponding to the type of data in the cell. The function returnsbfor blank if the cell is empty,lfor label if the cell contains a text constant, orvfor value if the cell isn't in either of the other categories.
- width: The column width of the cell. The function returns an array with 2 items: first the column width of the cell, rounded off to an integer; second a Boolean value of TRUE if the column width is the default or FALSE if the width was set by the user. Each unit of width is equal to the width of one character in the default font size.
- height: The row height of the cell. The function returns an array with 2 items: first the row height of the cell, rounded off to an integer; second a Boolean value of TRUE if the height is the default or FALSE if the height was set by the user. Each unit of height is equal to the height of one character in the default font size.
- filename: The name of the workbook.
- wd.sheet.count: The count of sheets in the workbook.
- wd.sheet.name: The name of the sheet containing the formula.
- wd.sheet.names: The names of all sheets in the workbook.
- wd.workbook.id: The workbook ID.
- wd.workbook.name: The workbook name.
- reference: The cell that you want information about. If you omit the argument, the function returns the information specified in the info_type argument for the last cell that was changed; in Worksheets, a last-changed cell is one that was changed by setting values, setting formulas, clearing values, or clearing formulas. If you specify a range as the reference argument, the function returns the information for only the upper left cell of the range.