Syntax
| Parameter | Description |
|---|---|
| value | Parameter of the TYPE function. |
Examples
Determine data type
=TYPE(A1)
Type-specific handling
=CHOOSE(TYPE(A1), A1*2, UPPER(A1), IF(A1,"Yes","No"), "", "Error")
Find non-numeric cells
=IF(TYPE(B2)<>1, "Not a number", "")
Common Errors
TYPE itself does not error — it returns a valid number for any input, including error values (returns 16 for errors).
Tips
1=Number, 2=Text, 4=Logical (TRUE/FALSE), 8=Formula, 16=Error, 64=Array. Number includes dates since dates are stored as numbers.
Both dates and numbers return TYPE=1. Dates are just formatted numbers internally. There is no built-in way to detect date type specifically.
Unlike most functions, TYPE doesn't propagate errors. TYPE(#DIV/0!) returns 16, not #DIV/0!. It is one of the few functions that can examine errors without triggering them.
Try TYPE in Viztab
Import your data and use TYPE with 370+ other formulas. No signup required.
Open Viztab