Get the type of value in a cell
=TYPE(value)
| Parameter | Description |
|---|---|
value |
The value to check the type of. |
The TYPE function returns a numeric code:
=TYPE(100) // returns 1 for numbers
=TYPE("apple") // returns 2 for text
=TYPE(TRUE) // returns 4 for logicals
TYPE returns 16 for errors:
=TYPE(3/0) // returns 16
=TYPE(NA()) // returns 16
If TYPE is given an array constant, or a range, the result is 64:
=TYPE({1;2;3}) // returns 64
=TYPE(A1:C1 // returns 64
TYPE returns 128 for compound data, like LAMBDA functions:
=TYPE(LAMBDA(x,x*x)) // returns 128