<< Click to Display Table of Contents >> CELL (information about a cell) |
Syntax:
CELL(Type [, Reference])
Description:
Returns various types of information about a cell.
Type specifies the type of information to return. Type can be one of the following text strings:
Type |
Explanation |
"address" |
Returns the address of the cell (as a text string). |
"width" |
(Not supported. Returns a #N/A error value.) |
"filename" |
Returns the full path and filename of the document that contains the cell. |
"color" |
Returns 1 if the cell uses the number format option Negative numbers in red, or 0 if not. |
"format" |
(Not supported. Returns a #N/A error value.) |
"contents" |
Returns the value stored in the cell. |
"parentheses" |
(Not supported. Returns a #N/A error value.) |
"prefix" |
Returns one of the following text strings: ' if the cell contains left-aligned text ^ if the cell contains centered text " if the cell contains right-aligned text \ if the cell contains fill-aligned text "" if the cell contains anything else |
"protect" |
Returns 1 if the cell is protected, or 0 if not. |
"col" |
Returns the column number of the cell (as a number). |
"type" |
Returns one of the following text strings: b (for blank) if the cell is empty l (for label) if the cell contains text v (for value) if the cell contains anything else |
"row" |
Returns the row number of the cell. |
Reference (optional) is the address of the cell to be evaluated.
If Reference is a range of cells, only the top left cell will be evaluated.
If Reference is omitted, the current cell will be evaluated. (Excel behaves differently, see the note below.)
Compatibility notes:
This function is not fully identical to Microsoft Excel's CELL function. The following restrictions apply:
1. Some types of information are not supported by PlanMaker (see the table above).
2. When the parameter Reference is omitted, PlanMaker evaluates the current cell, whereas Excel evaluates the cell that was last changed.
Example:
=CELL("row", B5) returns the row number of the cell B5, i.e. 5.
See also: