Information Functions
/text/scalc/01/04060104.xhp
information functions
Function Wizard; information
functions; information functions
Information Functions
This category contains the Information functions.
The data in the following table serves as the basis for some of the examples in the function descriptions:
C
D
2
x - value
y - value
3
- -5
- -3
4
- -2
- 0
5
- -1
- 1
6
- 0
- 3
7
- 2
- 4
8
- 4
- 6
9
- 6
- 8
CELL function
cell information
information on cells
mw added two entries
CELL
Returns information on address, formatting or contents of a cell.
CELL("InfoType"[; Reference])
InfoType is the character string that specifies the type of information. The character string is always in English. Upper or lower case is optional.
InfoType
Meaning
COL
Returns the number of the referenced column.
- =CELL("COL";D2)
returns 4.
ROW
Returns the number of the referenced row.
- =CELL("ROW";D2)
returns 2.
SHEET
Returns the number of the referenced sheet.
- =CELL("Sheet";Sheet3.D2)
returns 3.
ADDRESS
Returns the absolute address of the referenced cell.
- =CELL("ADDRESS";D2)
returns $D$2.
- =CELL("ADDRESS";Sheet3.D2)
returns $Sheet3.$D$2.
- =CELL("ADDRESS";'X:\dr\test.ods'#$Sheet1.D2)
returns 'file:///X:/dr/test.ods'#$Sheet1.$D$2.
FILENAME
Returns the file name and the sheet number of the referenced cell.
- =CELL("FILENAME";D2)
returns 'file:///X:/dr/own.ods'#$Sheet1, if the formula in the current document X:\dr\own.ods is located in Sheet1.
- =CELL("FILENAME";'X:\dr\test.ods'#$Sheet1.D2)
returns 'file:///X:/dr/test.ods'#$Sheet1.
COORD
Returns the complete cell address in Lotus™ notation.
- =CELL("COORD"; D2)
returns $A:$D$2.
- =CELL("COORD"; Sheet3.D2)
returns $C:$D$2.
CONTENTS
Returns the contents of the referenced cell, without any formatting.
TYPE
Returns the type of cell contents.
b = blank. empty cell
l = label. Text, result of a formula as text
v = value. Value, result of a formula as a number
WIDTH
Returns the width of the referenced column. The unit is the number of zeros (0) that fit into the column in the default text and the default size.
PREFIX
Returns the alignment of the referenced cell.
' = align left or left-justified
" = align right
^ = centered
\ = repeating (currently inactive)
PROTECT
Returns the status of the cell protection for the cell.
1 = cell is protected
0 = cell is not protected
FORMAT
Returns a character string that indicates the number format.
, = number with thousands separator
F = number without thousands separator
C = currency format
S = exponential representation, for example, 1.234+E56
P = percentage
In the above formats, the number of decimal places after the decimal separator is given as a number. Example: the number format #,##0.0 returns ,1 and the number format 00.000% returns P3
D1 = MMM-D-YY, MM-D-YY and similar formats
D2 = DD-MM
D3 = MM-YY
D4 = DD-MM-YYYY HH:MM:SS
D5 = MM-DD
D6 = HH:MM:SS AM/PM
D7 = HH:MM AM/PM
D8 = HH:MM:SS
D9 = HH:MM
G = All other formats
- (Minus) at the end = negative numbers are formatted in color
() (brackets) at the end = there is an opening bracket in the format code
COLOR
Returns 1, if negative values have been formatted in color, otherwise 0.
PARENTHESES
Returns 1 if the format code contains an opening bracket (, otherwise 0.
Reference (list of options) is the position of the cell to be examined. If Reference is a range, the cell moves to the top left of the range. If Reference is missing, $[officename] Calc uses the position of the cell in which this formula is located. Microsoft Excel uses the reference of the cell in which the cursor is positioned.