Use Excel's TYPE Function to Check the Type of Data in a Cell

Find the Type of Data in a Cell with the Excel TYPE Function
Find the Type of Data in a Cell with the Excel TYPE Function. © Ted French

Excel’s TYPE function is one of a group of information functions that can be used to find out information about a specific cell, worksheet, or workbook.

As shown in the image above, the TYPE function can be used to find out information about the type of data located in a specific cell such as:

Data TypeFunction Returns
a numberreturns a value of 1 - row 2 in the image above;
text datareturns a value of 2 - row 5 in the image above;
Boolean or logical valuereturns a value of 4 - row 7 in the image above;
error valuereturns a value of 1 - row 8 in the image above;
an arrayreturns a value of 64 - rows 9 and 10 in the image above.

 

Note: the function cannot, however, be used to determine whether a cell contains a formula or not. TYPE only determines what type of value is being displayed in a cell, not whether that value is generated by a function or formula.

In the image above, cells A4 and A5 contain formulas that return a number and text data respectively. As a result, the TYPE function in those rows returns a result of 1 (number) in row 4 and 2 (text) in row 5.

The TYPE Function's Syntax and Arguments

A function's syntax refers to the layout of the function and includes the function's name, brackets, and arguments.

The syntax for the TYPE function is:

= TYPE ( Value )

Value - (required) can be any type of data such as a number, text or array. This argument can also be a cell reference to the location of the value in a worksheet.

Type Function Example

Options for entering the function and its arguments include:

  1. Typing the complete function: =TYPE(A2) into cell B2
  1. Selecting the function and its arguments using the TYPE function dialog box

Although it is possible to just type the complete function in by hand, many people find it easier to use the dialog box to enter the function's arguments.

Using this approach, the dialog box takes care of such things as entering the equal sign, the brackets, and, when necessary, the commas that act as separators between multiple arguments.

Entering the TYPE Function

The information below cover the steps used to enter the TYPE function into cell B2 in the image above using the function's dialog box.

Opening the Dialog Box

  1. Click on cell B2 to make it the active cell - the location where the function results will be displayed;
  2. Click on the Formulas tab of the ribbon menu;
  3. Choose More Functions > Information from the ribbon to open the function drop down list;
  4. Click on TYPE in the list to bring up that function's dialog box.

Entering the Function's Argument

  1. Click on cell A2 in the worksheet to enter the cell reference into the dialog box;
  2. Click OK to complete the function and return to the worksheet;
  3. The number" 1 " should appear in cell B2 to indicate that the type of data in cell A2 is a number;
  4. When you click on cell B2, the complete function =TYPE(A2) appears in the formula bar above the worksheet.

Arrays and Type 64

In order to get the TYPE function to return a result of 64 - indicating that the type of data is an array - the array must be entered directly into the function as the Value argument - rather than using the cell reference to the array's location.

As shown in rows 10 and 11, the TYPE function returns the result of 64 no matter whether the array contains numbers or text.

Format
mla apa chicago
Your Citation
French, Ted. "Use Excel's TYPE Function to Check the Type of Data in a Cell." ThoughtCo, Jun. 5, 2017, thoughtco.com/check-the-type-of-data-in-cell-3123668. French, Ted. (2017, June 5). Use Excel's TYPE Function to Check the Type of Data in a Cell. Retrieved from https://www.thoughtco.com/check-the-type-of-data-in-cell-3123668 French, Ted. "Use Excel's TYPE Function to Check the Type of Data in a Cell." ThoughtCo. https://www.thoughtco.com/check-the-type-of-data-in-cell-3123668 (accessed September 20, 2017).