Back to functions
Information2026-11-115 related articles

TYPE Function in Excel

Return a code that identifies the data type of a value.

Syntax

TYPE(value)
Table of Contents

Arguments

value

Required

The value, cell reference, or formula result Excel should classify.

What it returns

Returns a number that identifies the type of the supplied value.

What TYPE does

TYPE tells you how Excel classifies a value. It is most useful when imported or generated data looks correct on screen but behaves differently in formulas because Excel is treating it as text, a number, an error, or an array.

Practical examples

Check whether a result is text or a number

Put the number 42 in A2 and the text 42 in A3. To enter the text, type '42; the leading apostrophe tells Excel to store text and isn't part of the value.

=TYPE(A2)
Excel

This returns 1. Changing the reference to A3 returns 2, even though both cells display 42.

Test the output of a text-building formula

Format B2 as Text before entering Jun 30, and put the number 2010 in C2:

=TYPE(CONCATENATE(B2,", ",C2))
Excel

CONCATENATE builds the text Jun 30, 2010, so TYPE returns 2. Looking like a date doesn't turn that result into an Excel date number.

Identify a literal array

Using US array separators, enter:

=TYPE({1,2;3,4})
Formula

The result is 64, the array code. The braces supply a two-row, two-column array of numbers; TYPE classifies the supplied array rather than reporting the type of each element separately.

Common mistakes and notes

TYPE returns a code, not a label

TYPE does not return words such as Number or Text. It returns numeric codes, so you need to know what each code means.

Value typeCode
Number1
Text2
Logical value4
Error16
Array64
Compound data128

These codes are listed in Microsoft's TYPE documentation.

A formula is classified by its result

TYPE doesn't tell you whether a cell contains a formula. A formula returning a number has type 1; one returning text has type 2. The CONCATENATE example checks that result directly.

Display formatting does not change the underlying type

A value can look like a date or currency and still be stored as a plain number. TYPE checks the stored value, not just the cell formatting.

Related functions

Related articles

Deep dives, troubleshooting guides, and practical examples that use TYPE.

Official documentation