ExcelFunctions.net Logo

The Excel TYPE Function

Home » Excel-Built-In-Functions » Excel-Information-Functions » Excel-Type-Function
Search this site:
Custom Search
Related Functions: 

Basic Description

The Excel TYPE function receives a value and returns an integer, that represents the supplied value's data type.

The syntax of the function is:

TYPE( value )

Where the supplied 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 Excel 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


Type Function Examples

The spreadsheets below show examples of the Excel Type function. The formulas are displayed in the spreadsheet on the left and the results are shown in the spreadsheet on the right:

 Formulas:
  A B
1 =TYPE( 2 )  
2 =TYPE( "text" )  
3 =TYPE( TRUE )  
4 =TYPE( {1, 2, 3} )  
5 =TYPE( 10/2 )  
6 =TYPE( B6 ) #VALUE!
7 =TYPE( B7 )  
 Results:
  A B
1 1  
2 2  
3 4  
4 64  
5 1  
6 16 #VALUE!
7 1  

Note that, in the example above, the Type function in cell A7, has evaluated the empty cell B7 as the value 0. The function has therefore returned the integer 1, to denote a numeric value.


Further information and examples of the Excel Type function can be found on the Microsoft Office website.





Valid XHTML 1.0 Transitional
Disclaimer Privacy Policy

Copyright © 2008-2011 ExcelFunctions.net