Information
TYPE Function in Excel
Returns a number indicating the data type of a value.
Syntax
- =TYPE(value)
Arguments
- value (required): Value to check type of
Examples
- =TYPE("text") - Text type - Result: 2
- =TYPE(123) - Number type - Result: 1
Defensive formulas with TYPE
- Use IS* functions inside IF to branch on blank, error, text, or number cells.
- Prefer [IFERROR](/functions/iferror/) when you only need a fallback display value.
- Error hub: [Fix formula errors](/guides/fix-excel-formula-errors/).
Common errors
- Returns: 1=number, 2=text, 4=logical, 16=error, 64=array
Use cases
- Data validation
- Type checking
- Error handling
Frequently asked questions
- What are all the TYPE return values? TYPE returns: 1=number, 2=text, 4=logical (TRUE/FALSE), 16=error value (#N/A, #VALUE!, etc.), 64=array. Use these to build conditional logic based on data type.
- How do I check if a cell contains an array formula? TYPE returns 64 for arrays. However, with dynamic arrays in Excel 365, spilled results show TYPE=1 or 2 for individual cells. Use ISFORMULA combined with checking if adjacent cells are part of a spill range.
- When should I use TYPE vs IS functions? Use IS functions (ISNUMBER, ISTEXT, etc.) for simple TRUE/FALSE checks. Use TYPE when you need to distinguish between multiple types in one formula, like =CHOOSE(TYPE(A1), "Number", "Text", "", "Boolean").
Editorial review
- Reviewed by Excel.Directory Editorial Team. Updated May 2026.