TYPE
Syntax:
TYPE ( value )
Description: Computes the type of value or, if value is a reference to a single cell, the type of the value in that cell.
Arguments:
Name |
Type |
Description |
---|---|---|
value |
any |
The value whose type is to be determined. No conversion shall take place on an argument passed to this function. |
Return Type and Value: number – An integer that indicates the type of value or, if value is a reference to a single cell, the type of the value in that cell, as follows:
Type of value |
Value Returned |
---|---|
number |
1 |
text |
2 |
logical |
4 |
error value |
16 |
array of any kind |
64 |
TYPE(5/0)
results in 16
TYPE(A10)
results in 16
, when A10 contains any error valueTYPE({1,2,3})
results in 64
TYPE({TRUE,2.5,#N/A})
results in 64
TYPE(IF(10>5,"Yes",20))
results in 2
TYPE(IF(10<5,"Yes",20))
results in 1
]