How to use TYPE Function in Excel

how to use excel type function

Quick Intro

You can use Excel TYPE Function to check the type of value from a cell. In simple words, it will return that what type of a data captured in a cell.

Excel type function is helpful when a function is dependent on the value type of a cell.

In the below example, I have used type function check which type of value is entered in a cell. For a value which is a number, it has returned 1 & for a value which is text, it has returned 2.

Defination for Excel TYPE Function

TYPE will return 5 different numbers in the result depending on the type of values from a cell. Following are the codes which can be returned by type function against the values from a cell.

1231Return number 1 when a value is a NUMBER.
ABC2Return number 2 when a value is a TEXT.
TRUE4Return number 1 when the value is a LOGICAL VALUE.
#N/A16Return number 1 when value is an ERROR.
ARRAY64Return number 1 when a value is an ARRAY.



  • value Reference of a cell or a value for which you want to test the type.

Additional Information on Type Function

  • When you test value from a cell which has a formula, Type function will test the value return by that formula.
  • If you refer to a cell which is blank, it will return number 1 as a result.
  • If you refer to a cell which contains date it will return 1 in a result as a date has a value in number.


In the below example, we have used TYPE Function with IF Function. This formula will return the message “Enter Valid Quantity” if the user enters a value other than a number.

=IF(TYPE(F3)<>1,”Enter Valid Quantity”,E3*F3)

examples to understand excel type function

Sample File

download sample file to learn more about this tips

What’s Next?

To learn more about Excel TYPE Function you can check Microsoft’s Help Section. And, if you have a unique idea to use it, I would love to hear from you.

There is also you have ERROR.TYPE function which is highly useful. Apart from this, I have a list of excel functions and some real life formulas examples.