Related Topics: | ||
Description: Returns the type of value, for example, number = 1, text = 2, logical value = 4, error value = 16, and array = 64. Use TYPE when the behavior of another function depends on the type of value in a particular cell.
Syntax: TYPE(Value)
Value can be any software value, such as a number, text, logical value, and so on.
If Value is | TYPE returns |
Number | 1 |
Text | 2 |
Logical value | 4 |
Error value | 16 |
Array | 64 |
Remarks:
TYPE is most useful when you are using functions that can accept different types of data, such as ARGUMENT and INPUT. Use TYPE to find out what type of data is returned by a function or formula.
You cannot use TYPE to determine whether a cell contains a formula. TYPE only determines the type of the resulting, or displayed, value. If value is a cell reference to a cell that contains a formula, TYPE returns the type of the formula's resulting value.
Example:
If A1 contains the text "Smith", then:
TYPE(A1) = 2 [checks the type of the value]
TYPE("MR. "&A1) = 2 [checks the type of "Mr. Smith"]
TYPE(2 + A1) = 16 [checks the type of the formula, which returns the error #VALUE!]
TYPE({1, 2; 3, 4}) = 64 [checks the type of an array constant]
© 1992-2013. ReliaSoft Corporation. ALL RIGHTS RESERVED.