How to Use the TYPE Function in Google Sheets

The TYPE function in Google Sheets is a built-in tool that helps identify the type of value stored in a cell or returned by a formula. This can be useful when working with mixed data types or troubleshooting complex formulas. As expected, it’s part of the “Info” function category in Sheets.

Google Sheets returns 6 numeric codes with the TYPE function. Let’s explore them.

Numbers Returned by the TYPE Function in Google Sheets

Value in Cell or Formula OutputTYPE Function Output
Number (includes Date or Blank Cell)1
Text or Emojis2
Boolean TRUE/FALSE (including Tick Box)4
Error16
Array Output64
Image in Cell or In-cell Sparklines128

Syntax of the TYPE Function

TYPE(value)
  • value: Any value, cell reference, or formula result you want to evaluate.

Example Formulas Using TYPE

Google Sheets TYPE function examples and output types explained

Here are 6 example formulas to demonstrate all six possible outputs of the TYPE function:

1. Number

=TYPE(100)
Result: 1

2. Text

=TYPE("France")
Result: 2

3. Boolean (TRUE/FALSE) or Checkbox

=TYPE(TRUE)
Result: 4

4. Error

=TYPE(#N/A)
Result: 16

5. Array

=TYPE({"Jon","Mary"})
Result: 64

6. Image or Sparkline

=TYPE(SPARKLINE({30, 20}, {"charttype","bar";"max",50}))
Result: 128

Special Notes

  • If a cell contains a formula, TYPE only evaluates the result of that formula, not the formula itself.
  • The TYPE function in Google Sheets does not return arrays like ERROR.TYPE might.
  • Using =TYPE(SEQUENCE(10)) returns 64 because SEQUENCE(10) is an array.

Real-Life Use Cases for TYPE in Google Sheets

While not widely used, the TYPE function can be helpful in:

  • Detecting whether a cell contains a checkbox:
    =IF(TYPE(A1)=4, "Checkbox or Boolean", "Other")
  • Validating if a cell contains a Sparkline or Image:
    =IF(TYPE(A1)=128, "Image available", "Image missing")
  • Debugging dynamic formulas that might return arrays or unexpected data types.

Final Thoughts

The TYPE function is a useful diagnostic tool in Google Sheets. While its use may be niche, it provides insight into what kind of data your formulas or inputs are returning — which can help in debugging and validation tasks.

Prashanth KV
Prashanth KV
Your Trusted Google Sheets and Excel Expert Prashanth KV is a Diamond Product Expert in Google Sheets, officially recognized by Google for his contributions to the Docs Editors Help Community and featured in the Google Product Experts Directory. With years of experience working with Google Sheets and Excel for multinational firms in Mumbai and Dubai, he has been blogging since 2012, offering practical, real-world spreadsheet solutions that professionals rely on. Explore his blog to learn advanced formulas, automation tips, and problem-solving techniques to elevate your spreadsheet skills.

Mode of Comma-Separated Numbers in Excel (Dynamic Array)

There is no dedicated function in Excel to directly find the mode of comma-separated...

How to Find Mode of Comma-Separated Numbers in Google Sheets

Working with comma-separated numbers inside a single cell is a common scenario in Google...

How to Count Merged Cells in Google Sheets (and Get Their Size)

Sometimes, you may have blocks of merged cells in a column or row. But...

Count Consecutive Workday Absences in Google Sheets

This tutorial offers a powerful formula-based solution to count consecutive workday absences in Google...

More like this

How to Find Mode of Comma-Separated Numbers in Google Sheets

Working with comma-separated numbers inside a single cell is a common scenario in Google...

How to Count Merged Cells in Google Sheets (and Get Their Size)

Sometimes, you may have blocks of merged cells in a column or row. But...

Count Consecutive Workday Absences in Google Sheets

This tutorial offers a powerful formula-based solution to count consecutive workday absences in Google...

LEAVE A REPLY

Please enter your comment!
Please enter your name here

This site uses Akismet to reduce spam. Learn how your comment data is processed.