How to Use Excel's TYPE Function
Excel's TYPE function returns the data type of a specified value. If this value is a reference to a cell containing a formula, TYPE returns the type of a formula's resulting or displayed value. TYPE is used when a value's type affects the behavior of another function.
Instructions
-
-
1
Learn the syntax for TYPE. It is TYPE(test_value).
-
2
Specify test_value, which may be any Excel value including an array, error value, logical value, number or text.
-
-
3
Interpret the return value for TYPE. A number is 1, test is 2, a logical value is 4, an error value is 16 and an array is 64.
-
4
Use TYPE most often to determine what data type is being returned by a function such as ARGUMENT and INPUT that can return data of more than one type. TYPE cannot be used to determine if a cell contains a formula.
-
5
Look at some examples of how TYPE may be used.
For A2 = test text and B2 = 12
TYPE(B2) = 1. The contents of B2 evaluate to a number (12).
TYPE(B2+1) = 1. The formula B2 + 1 evaluates to a number (13).
TYPE(A2) = 2. "test text" is text.
TYPE("this is "&A2) = 2. "this is test text" is text.
TYPE(TRUE) = 4. This formula is a logical value.
TYPE(A2+1) = 16. This formula returns #VALUE! which is an error value.
TYPE({1,2;3,4}) = 64. This formula is an array.
-
1