Difference between revisions of "Documentation/How Tos/Calc: TYPE function"
From Apache OpenOffice Wiki
< Documentation | How Tos
(more 'arrays' detail) |
Javier Lopez (Talk | contribs) |
||
Line 1: | Line 1: | ||
− | + | {{Documentation/MasterTOC | |
+ | |bookid=1234''' | ||
+ | |booktitle=<div style="padding: 8px; font-size: 140%; font-weight: bold; background-color: #9BC0F5;">CALC FUNCTIONS</div> | ||
+ | |ShowParttitle=block|parttitle=[[Documentation/How_Tos/Calc:_Information_functions|<div style="font-size: 140%;">Information Functions]] | ||
+ | |ShowNextPage=block|NextPage=Documentation/How_Tos/Calc:_Logical_functions | ||
+ | |ShowPrevPage=block|PrevPage=Documentation/How_Tos/Calc:_NA_function | ||
+ | |ShowPrevPart=block|PrevPart=Documentation/How_Tos/Calc:_Financial_functions | ||
+ | |ShowNextPart=block|NextPart=Documentation/How_Tos/Calc:_Logical_functions | ||
+ | |toccontent= <div style="padding: 4px; font-size: 130%; font-weight: hidden; background-color:#DCE9FC;">FUNCTIONS</div> | ||
+ | |||
+ | * [[Documentation/How_Tos/Calc:_CELL_function|<div style="font-size: 120%;">Cell]] | ||
+ | * [[Documentation/How_Tos/Calc:_CURRENT_function|<div style="font-size: 120%;">Current]] | ||
+ | * [[Documentation/How_Tos/Calc:_FORMULA_function|<div style="font-size: 120%;">Formula]] | ||
+ | * [[Documentation/How_Tos/Calc:_ISBLANK_function|<div style="font-size: 120%;">Isblank]] | ||
+ | * [[Documentation/How_Tos/Calc:_ISERR_function|<div style="font-size: 120%;">Iserr]] | ||
+ | * [[Documentation/How_Tos/Calc:_ISERROR_function|<div style="font-size: 120%;">Iserror]] | ||
+ | * [[Documentation/How_Tos/Calc:_ISEVEN_function|<div style="font-size: 120%;">Iseven]] | ||
+ | * [[Documentation/How_Tos/Calc:_ISEVEN_ADD_function|<div style="font-size: 120%;">Iseven Add]] | ||
+ | * [[Documentation/How_Tos/Calc:_ISLOGICAL_function|<div style="font-size: 120%;">Islogical]] | ||
+ | * [[Documentation/How_Tos/Calc:_ISNA_function|<div style="font-size: 120%;">Isna]] | ||
+ | * [[Documentation/How_Tos/Calc:_ISNONTEXT_function|<div style="font-size: 120%;">Isnontext]] | ||
+ | * [[Documentation/How_Tos/Calc:_ISNUMBER_function|<div style="font-size: 120%;">Isnumber]] | ||
+ | * [[Documentation/How_Tos/Calc:_ISODD_function|<div style="font-size: 120%;">Isodd]] | ||
+ | * [[Documentation/How_Tos/Calc:_ISODD_ADD_function|<div style="font-size: 120%;">Isodd Add]] | ||
+ | * [[Documentation/How_Tos/Calc:_ISREF_function|<div style="font-size: 120%;">Isref]] | ||
+ | * [[Documentation/How_Tos/Calc:_ISTEXT_function|<div style="font-size: 120%;">Istext]] | ||
+ | * [[Documentation/How_Tos/Calc:_N_function|<div style="font-size: 120%;">N]] | ||
+ | * [[Documentation/How_Tos/Calc:_NA_function|<div style="font-size: 120%;">Na]] | ||
+ | * [[Documentation/How_Tos/Calc:_TYPE_function|<div style="font-size: 120%; border-style: double; border-color:#778899;">Type]] | ||
+ | }}__TOC__ | ||
+ | |||
== TYPE == | == TYPE == |
Revision as of 04:44, 1 June 2013
CALC FUNCTIONS
- Information Functions
- CellCurrentFormulaIsblankIserrIserrorIsevenIseven AddIslogicalIsnaIsnontextIsnumberIsoddIsodd AddIsrefIstext
Contents
TYPE
Returns the type of value (number, text, etc.).
Syntax:
TYPE(value)
- Returns the type of value as a number: 1 = number, 2 = text, 4 = logical value, 8 = formula, 16 = error value, 64 = array.
- If a cell contains both an error and a formula, 16 (error value) is returned.
- A blank cell is classed as a number here, and 1 is returned.
Example:
TYPE(C2)
- where cell C2 contains dog returns 2, because dog is text.
TYPE(C3)
- where cell C3 contains =NA() returns 16, because NA() returns the error value #N/A.
Advanced topic:
For more information on arrays, see Using arrays.
TYPE({3;5;7})
- returns 64
{=TYPE(A1:B1)} entered as an array formula in cells A3:B3
- returns 64 in cells A3:B3 (whatever the contents of cells A1 and B1), as A1:B1 is an internal array in the array formula.
TYPE(A1:B1) entered as a normal formula in both cells A3 and B3
- returns TYPE(A1) in cell A3, and TYPE(B1) in cell B3. Here Calc finds the row/column intersection of the formula cell with range A1:B1, to determine a reference to the single cell to examine.
TYPE(D1), where D1:D2 contain the array formula {={4;2}}
- returns 8. Here the result is for D1's content, which although part of an array is not the array itself.
Issues:
- Calc returns 8 for a formula. Excel returns the TYPE of the formula's returned value; it has no return value to recognise a formula.
-