# Documentation/How Tos/Calc: TYPE function

From Apache OpenOffice Wiki

< Documentation | How Tos

## Contents

## TYPE

Returns the type of value (number, text, etc.).

### Syntax:

**TYPE(value)**

- Returns the type of value as a number:
= number,**1**= text,**2**= logical value,**4**= formula,**8**= error value,**16**= array.**64**

- If a cell contains both an error and a formula,
(error value) is returned.**16** - A blank cell is classed as a number here, and
is returned.**1**

### Example:

**TYPE(C2)**

- where cell C2 contains
returns**dog**, because**2**is text.**dog**

**TYPE(C3)**

- where cell C3 contains
returns**=NA()**, because**16**returns the error value**NA()**.**#N/A**

*Advanced topic:*

For more information on arrays, see Using arrays.

**TYPE({3;5;7})**

- returns
**64**

` {=TYPE(A1:B1)}` entered as an array formula in cells A3:B3

- returns
in cells A3:B3 (whatever the contents of cells A1 and B1), as A1:B1 is an internal array in the array formula.**64**

` TYPE(A1:B1)` entered as a normal formula in both cells A3 and B3

- returns
in cell A3, and**TYPE(A1)**in cell B3. Here Calc finds the row/column intersection of the formula cell with range A1:B1, to determine a reference to the single cell to examine.**TYPE(B1)**

` TYPE(D1)`, where D1:D2 contain the array formula {={4;2}}

- returns
. Here the result is for D1's content, which although part of an array is not the array itself.**8**

### Issues:

- Calc returns
for a formula. Excel returns the TYPE of the formula's returned value; it has no return value to recognise a formula.**8**

**See Also**