TYPE()

Syntax. TYPE(value)

Definition. This function returns a number indicating the data type of the value argument.

Arguments

  • value (required). The expression (a number, text, a formula without an equal sign, a logical value, an error value, a reference, or a name) that you want to check

Background. This function is related to the IS() functions, which return a logical value depending on the argument.

This function is often used together with the IF() function to pre-test the result of a calculation. The result returned by an IS() function can be used as the basis for conditional formats and validation rules.

To use this function, you should be familiar with the mappings listed in Table 11-7.

Table 11-7. Types Mapped to Numbers

Argument

Return Value ...

Get Microsoft® Excel® 2010 Formulas & Functions Inside Out now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.