ID EN
#Information

TYPE

Excel Functions

Get the type of value in a cell

Syntax

EXCEL
=TYPE(value)

Arguments

Parameter Description
value The value to check the type of.

Return Value

A numeric code representing type

Details

The TYPE function returns a numeric code representing "type" in 5 categories: number = 1, text = 2, logical = 4, error = 16, and array = 64. The TYPE function takes one argument, value, which can be a reference, a formula, or a hardcoded value. The table below shows the possible type codes returned from TYPE and the meaning of each: The TYPE function returns a numeric code: TYPE returns 16 for errors: If TYPE is given an array constant, or a range, the result is 64: TYPE returns 128 for compound data, like LAMBDA functions:

Examples

Examples

The TYPE function returns a numeric code:

EXCEL
=TYPE(100) // returns 1 for numbers
=TYPE("apple") // returns 2 for text
=TYPE(TRUE) // returns 4 for logicals
Examples

TYPE returns 16 for errors:

EXCEL
=TYPE(3/0) // returns 16
=TYPE(NA()) // returns 16
Examples

If TYPE is given an array constant, or a range, the result is 64:

EXCEL
=TYPE({1;2;3}) // returns 64
=TYPE(A1:C1 // returns 64
Examples

TYPE returns 128 for compound data, like LAMBDA functions:

EXCEL
=TYPE(LAMBDA(x,x*x)) // returns 128

See Also

ISNUMBER ISTEXT ISERROR ISFORMULA ISREF ISLOGICAL