TYPE

Formulas / TYPE
Determine the type of value in a cell.
TYPE(value)
  • value - required, any Sourcetable value

Examples

  • =TYPE(A2)

    The TYPE function can be used to return the type of the value in a cell. For example, this will return the type of the value in cell A2. In this case, the type is 2, which is the type for text.

  • =TYPE("Mr. "&A2)

    The TYPE function can also be used to return the type of a formula. For example, this will return the type of the formula "Mr. Smith". In this case, the type is still 2, since it is the type for text.

  • =TYPE(2+A2)

    The TYPE function can also be used to return the type of an expression. For example, this will return the type of the expression in cell C6. In this case, the type is 16, which is the type for an error message, like #VALUE!.

Summary

The TYPE function is a useful tool for determining the type of data stored in a particular value. It can be used to ensure correct usage of functions that take different types of data.

  • The TYPE function takes one argument, which is a string representing a value. This value can be a reference, formula, or hardcoded value.
  • The TYPE function returns a numeric code that indicates the type of value in a cell. The code will be 0 for a logical value, 1 for a text value, 2 for a number, 3 for a date, 4 for a error value, and 5 for an array.


Frequently Asked Questions

What is the syntax for the TYPE function?
The syntax for the TYPE function is TYPE(value, [type]).
What is the argument for the TYPE function?
The argument for the TYPE function is value.
Is the value argument required?
Yes, the value argument is required.
What is the value argument?
The value argument is any Sourcetable value.
What are some examples of Sourcetable values?
Examples of Sourcetable values include:
  • Numbers
  • Text
  • Boolean values (TRUE or FALSE)
  • Error values (such as #N/A or #DIV/0!)
  • Arrays
Sourcetable Logo

Work smarter

Al is here to help. Leverage the latest models to
analyze spreadsheets, enrich data, and create reports.

Drop CSV