Excel TYPE Function

Summary

The Excel TYPE function returns a numeric code representing "type" in 5 categories: number = 1, text = 2, logical = 4, error = 16, and array = 64. Use TYPE when the operation of a formula depends on the type of value in a particular cell.

Purpose

Get the type of value in a cell

Return value

A numeric code representing type

Syntax

=TYPE (value)

Arguments

Usage notes

Use TYPE to test the value in a particular cell so that other functions that depend on the type can perform as expected. The table below shows the possible type codes returned from TYPE and the meaning of each:

Type codeMeaning
1Number
2Text
4Logical value
16Error value
64Array

Notes:

 

Excel TYPE Function

Summary

The Excel TYPE function returns a numeric code representing "type" in 5 categories: number = 1, text = 2, logical = 4, error = 16, and array = 64. Use TYPE when the operation of a formula depends on the type of value in a particular cell.

Purpose

Get the type of value in a cell

Return value

A numeric code representing type

Syntax

=TYPE (value)

Arguments

Usage notes

Use TYPE to test the value in a particular cell so that other functions that depend on the type can perform as expected. The table below shows the possible type codes returned from TYPE and the meaning of each:

Type codeMeaning
1Number
2Text
4Logical value
16Error value
64Array

Notes: