All versions
Information
The Excel TYPE function returns a number describing what kind of value something is: 1 number, 2 text, 4 logical, 16 error, 64 array. Useful for formulas that must branch on data type.
Quick answer: what type is this?
=TYPE(A2) // 1=number 2=text 4=logical 16=error 64=array
Syntax
=TYPE(value)
| Argument | Description | |
|---|---|---|
value | Required | Any value or cell. |
How to use it
TYPE reports the value’s data type, not its content. It’s handy inside generic formulas and LAMBDA functions that should behave differently for numbers vs text vs errors. For yes/no type tests, the IS family (ISNUMBER, ISTEXT…) reads cleaner.
Try it: interactive demo
Live demo
Pick an input and watch the formula and result update.
Result:
Practice workbook
Download the free TYPE practice workbook
Every example on this page, ready to open in Excel — plus practice challenges with answers on a separate tab. No sign-up required.
Frequently asked questions
What do the codes mean?
1 = number, 2 = text, 4 = logical, 16 = error, 64 = array.
TYPE vs ISNUMBER/ISTEXT?
Use the IS functions for a single yes/no test; use TYPE when one formula must distinguish several types at once.
Does TYPE detect dates?
No — dates are numbers, so TYPE returns 1 for them.
Master functions like this in one day
This page covers one function. Our Excel Formulas and Functions class covers the 30 that matter most — live, hands-on, taught by professionals in Dallas–Fort Worth, Houston, Austin, Oklahoma City, Denver, or online.
See the Formulas & Functions Class