Formualizer Docs

TYPE

Returns an Excel TYPE code describing the value category.

The Formualizer engine in this repository at 0.15.0 plus unreleased changes computes the example results. Known differences from Excel are listed on this page.

Syntax

=TYPE(value)

Arguments

ArgumentTypeRequiredDefault
valueanyRequired—

Remarks

  • Codes: 1 number, 2 text, 4 logical, 16 error, 64 array.
  • Spreadsheet errors return 16; operation failures still propagate.
  • Blank values map to numeric code 1 in this implementation.

Examples

Read the type code of a numeric value.

Formula =TYPE(7)

Expected result 1

Try this formula

This editor runs the published Formualizer 0.14.0 package, so the last digits can differ and functions newer than that release return #NAME?.

Read the different type code for text with the same displayed character.

Formula =TYPE("7")

Expected result 2

Try this formula

This editor runs the published Formualizer 0.14.0 package, so the last digits can differ and functions newer than that release return #NAME?.

Read the type code for a logical value.

Formula =TYPE(TRUE)

Expected result 4

Try this formula

This editor runs the published Formualizer 0.14.0 package, so the last digits can differ and functions newer than that release return #NAME?.

Text type code

Formula =TYPE("abc")

Expected result 2

Try this formula

This editor runs the published Formualizer 0.14.0 package, so the last digits can differ and functions newer than that release return #NAME?.

FAQ

How are errors handled by TYPE?

Spreadsheet errors return Excel's error type code 16.

Implementation

Engine source

On this page