tech on the net

MS Excel: TYPE Function (WS)

Learn how to use the Excel TYPE function with syntax and examples.

Description

The Microsoft Excel TYPE function returns the type of a value.

Syntax

The syntax for the Microsoft Excel TYPE function is:

TYPE( value )

Parameters or Arguments

value can be text, numbers, logical values (TRUE or FALSE), arrays, or errors.

Value Returned
Number 1
Text 2
Logical value (ie: TRUE or FALSE) 4
Error value 16
Array 64

Applies To

The TYPE function can be used in the following versions of Microsoft Excel:

  • Excel 2013, Excel 2011 for Mac, Excel 2010, Excel 2007, Excel 2003, Excel XP, Excel 2000

Type of Excel Function

The TYPE function can be used in Microsoft Excel as the following type of function:

  • Worksheet function (WS)

Example (as Worksheet Function)

Let's look at some Excel TYPE function examples and explore how you would use the TYPE function as a worksheet function in Microsoft Excel:

Microsoft Excel

Based on the spreadsheet above, the following Excel TYPE examples would return:

=TYPE(A2) would return 16
=TYPE(A3) would return 2
=TYPE(A4) would return 1
=TYPE("techonthenet.com") would return 2
=TYPE(87) would return 1