ExcelFlux

TYPE function

a number indicating the data type of a value.

Information

Where can you use it?

Workbook and data quality owners. Use functions that inspect cell type, errors or the calculation environment when validating a report.

Scenario in the workbook

Inspect the type code of mixed values. Numbers return 1, text 2 and logical values 4.

A worked example from the workbook

RowA
6Input
742
8Pending
9TRUE
Record 1
=TYPE(A7)

Expected result1

See the inputs and instructions for all 3 examples

Syntax

TYPE(value)

Copyable formulas

English Excel · en-US
=TYPE(42)
Turkish Excel · tr-TR
=TÜR(42)

Expected result

1

Worked examples

Inspect the type code of mixed values. Numbers return 1, text 2 and logical values 4.

Open the English sheet. Inputs begin at A6. F7:F9 show the live results and G7:G9 show the original results for comparison.

Row A
6 Input
7 42
8 Pending
9 TRUE
Case Formula Expected result
Record 1 =TYPE(A7) 1
Record 2 =TYPE(A8) 2
Record 3 =TYPE(A9) 4
Microsoft Excel reference