The TYPE function evaluates a value and returns an integer, that represents the supplied value’s data type.

Syntax

=TYPE(value)

Arguments

Argument Description
value The value can be input either directly, as a value returned from a formula, or as a reference to a cell that contains a value.

The integers returned by the TYPE function and their corresponding data types are shown in the table below:

  1 Number
  2 Text
  4 Logical Value
  16 Error Value
  64 Array

Examples

  A B C D
1   Formula Result Notes
2   =TYPE(2) 1  
3   =TYPE(“text”) 2  
4   =TYPE(TRUE) 4  
5   =TYPE({1,2,3}) 64  
6   =TYPE(10/2) 1  
7 #VALUE! =TYPE(A7) 16  
8   =TYPE(A8) 1 Empty cells evaluate as the value 0; the function therefore returned the integer 1, to denote a numeric value