Excel Type Function

There are two ways to “excel type function”: the quick way you copy and the durable way you understand. This page gives you both. The exact Excel answer is above; below, we build the small mental model that makes the fix stick, so the next variation of the same problem solves itself.

Exact answer

In Excel: use =TYPE(value) — it returns a code for what kind of value a cell holds: 1 number, 2 text, 4 logical, 16 error, 64 array.

On this page8

Syntax

=TYPE(value)

Arguments

Argumentrequired / optionalDescription
valuerequiredThe value to classify: 1 number, 2 text, 4 logical, 16 error, 64 array.

Related functions

ISNUMBERISTEXTISERROR
▤Annotated stepsExcel
1

Add a helper column and type =TYPE( followed by the first cell.

2

Fill down the range you want to classify.

3

Filter or count by code — 2 among numbers means text, 16 means an error.

4

Use ERROR.TYPE on the 16s to find out which error each one is.

Ctrl+CthenCtrl+Shift+V⌘+Cthen⌘+Ctrl+VPaste values · WindowsMac

What this does

TYPE classifies a value in one call where the IS* family needs several. The codes are 1 for a number, 2 for text, 4 for a logical, 16 for an error and 64 for an array. That makes it convenient for a single audit column across mixed data, and for the related ERROR.TYPE, which goes further and identifies which error a cell holds — 1 for #NULL!, 2 for #DIV/0!, 3 for #VALUE!, 4 for #REF!, 5 for #NAME?, 6 for #NUM! and 7 for #N/A. When you only care about one category, ISNUMBER or ISTEXT reads far better. Most people learn this as a sequence of clicks and forget it by next week; learning it as a pattern instead is what lets you apply it to the next, slightly different version of the problem without starting from scratch. That is the difference this page is trying to make. Treat “excel type function” as a small repeatable workflow rather than a one-off click you hope to remember next time. Use a small test block before the live file, so any surprise in the affected formula shows up while it is still harmless. When a formula is involved, keep the inputs labelled beside it, reference cells instead of typing values, and apply number formatting only after the result checks out. That turns a calculation you can defend to a CFO or an auditor into a method you can reuse, explain, and defend when the workbook leaves your screen.

A worked example

A single audit column over a mixed range: =TYPE(B2) filled down returns 1 for the real numbers, 2 for the text-formatted ones and 16 for the errors, letting one filter reveal all three problems at once. Identifying which error is present: =ERROR.TYPE(D2) returns 7 for #N/A and 4 for #REF!. TYPE classifies a whole mixed range in one column, which is faster than three IS* passes when you do not yet know what is wrong. Check the referenced cells, argument order and result type in your workbook. Start with the worked example before changing an input, then compare the changed result with the calculation you expected. An error value or a result of a different type is a reason to inspect the inputs and arguments.

In Google Sheets

Google Sheets support for this task has not been verified. Check the function, arguments and workflow in the target product before transferring the example. Matching formula notation does not establish identical behaviour. Nothing on this page is behind a login or a download: the exact answer is at the top, and the detail below it is there for when you need it. That is the whole promise here — the answer first, and just enough context to make it stick. For “excel type function”, keep the input cells and the result visible while you check the formula in Excel. Follow the worked example and change one input at a time. The steps explain the workbook calculation; this page does not run a live calculator for that task.

Common mistakes

  • Reading the codes as a sequence; they are 1, 2, 4, 16, 64, with gaps.
  • Using TYPE where a single ISNUMBER or ISTEXT would state the intent more clearly.
  • Calling ERROR.TYPE on a cell with no error, which itself returns #N/A.

Frequently asked questions

What do the TYPE codes mean?

1 number, 2 text, 4 logical, 16 error, 64 array. The gaps are deliberate.

How do I identify which error a cell has?

=ERROR.TYPE(A2) returns 1 to 7 for the seven error types, with 7 being #N/A.

Should I use TYPE or ISNUMBER?

ISNUMBER when you care about one category — it reads better. TYPE when one column must classify everything at once.