Skip to Content

How to use Excel TYPE Function (With Examples)

The Excel TYPE function lets you check the data type of the given value. It returns an integer value corresponding to the type of the given value.

For example, suppose that you are preparing grade cards for students in your class. The expected grade entries are: A+, A, B, and Failed.

You are using Excel to compile the grades. Refer to the following image.

As you can see, for a few students, the scores are mentioned instead of their grades. Our task is to mark both the scores and grades entered in column B.

Our formula would be as follows:

=TYPE(B2)

Where cell B2 contains the first student’s grade.

The results are displayed in the following GIF.

How to use TYPE Function in Excel (With Example)

The formula returned the following values:

  • 1 for Scores
  • 2 for Grades

Syntax

The TYPE is a simple function categorized under Excel Information functions. It comes with the following syntax.

=TYPE(values)

Where values argument needs to be replaced with a cell reference or a direct value.

Here are the different values you can specify:

ValueOutput
Any numberThe function returns 1 for numeric values, including numbers, currencies, dates, etc.
TextThe function returns 2 for text strings, including text and symbols.
Logical valuesThe function returns 4 when the given cell contains logical values.
Error valueThe function returns 16 for all types of errors in Excel.
ArrayThe function returns 64 when you specify an array.

Important Notes:

  • The function is not case-sensitive.
  • If the given cell contains a formula, the function tests the value returned by the formula.
  • If the cell is blank, the function returns 1 as a default value.
  • The function cannot differentiate between different types of errors in Excel. It simply returns 16 as the output for all kinds of errors.

How to use the TYPE Function in Excel

Download the example spreadsheet used to demonstrate the TYPE function in the upcoming section. Practice is the key to success!

Download Now

Example 1: TYPE Function Basics

Suppose that you are a newly joined Purchase Executive. You received a file that includes the products to be purchased for an upcoming campaign. Refer to the following image.

You were expecting the products along with the quantity to be purchased. However, a few people mentioned eligibility and errors as shown above.

Now, your task is to mark the type of entries available in the Stock column.

Here are the steps:

  • Select the cell C2
  • Type =TYPE
  • Choose the first option from the popup
  • Specify B2
  • Complete the parentheses using )
  • Press the Enter key

Our formula is as follows:

=TYPE(B2)

Where cell B2 contains the stock of the first product.

The results are displayed in the following image.

Here, the formula returned different values:

  • 1 for valid stock (or numbers)
  • 2 for eligibility status (include Eligible and Yes)
  • 4 for logical values (TRUE and FALSE)
  • 16 for errors

Takeaway

The TYPE function is beneficial when the operation of a formula depends on the type of value in the given cell. 

I hope this article taught you all the bells and whistles of the TYPE function. Please comment below if you are stuck or encounter any particular error while using it. I will answer your questions as soon as possible.

Additional Resources:

  • Learn All Excel Information Functions (With Examples)
  • CELL Function in Excel
  • INFO Function in Excel
  • ERROR.TYPE Function in Excel
  • IF Function in Excel
  • Guide to Conditional Formatting in Excel
  • Different Types of Errors in Excel

Get an Office 365 Subscription to access all the powerful Functions and Tools in Excel.