> ## Documentation Index
> Fetch the complete documentation index at: https://docs.omni.co/llms.txt
> Use this file to discover all available pages before exploring further.

# Supported logic functions

> Omni supports functions typically found in most spreadsheet applications such as Google Sheets. This reference details the logic functions supported by Omni.

## AND

Returns `true` if all of the provided arguments are logically true. Returns `false` if any of the provided arguments are false. Can be combined with other functions like [`IF`](#if) to create advanced logical statements.

For more information, refer to the [Google Sheets documentation](https://support.google.com/docs/answer/3093301).

```
AND(condition1, condition2, ...)
```

**Example**

```
AND(A1 > 5, B1 < 10)         # Returns true if both conditions are true
```

## BITAND

Returns the bitwise boolean `AND` of two numbers.

For more information, refer to the [Google Sheets documentation](https://support.google.com/docs/answer/9061440).

```
BITAND(value1, value2)
```

**Example**

```
BITAND(6, 3)
```

## BITOR

Returns the bitwise boolean `OR` of two numbers.

For more information, refer to the [Google Sheets documentation](https://support.google.com/docs/answer/9083934).

```
BITOR(value1, value2)
```

**Example**

```
BITOR(6, 3)
```

## BITRSHIFT

Shifts the bits of the input a certain number of places to the right. Bits on the left are filled with zeroes. This function accepts two arguments:

* `value` - The number to be shifted
* `shift_amount` - The number of places to shift the given value

For more information, refer to the [Google Sheets documentation](https://support.google.com/docs/answer/9084100).

```
BITRSHIFT(value, shift_amount)
```

**Example**

```
BITRSHIFT(8, 2)
```

## BITXOR

Returns a number that's the result of performing an `XOR` function at each bit of the two numbers given as arguments. This function is a bitwise XOR (exclusive or) of 2 numbers that returns a bit of `“1”` if 2 bits are different, and a bit of `“0”` otherwise.

For more information, refer to the [Google Sheets documentation](https://support.google.com/docs/answer/9083935).

```
BITXOR(value1, value2)
```

**Example**

```
BITXOR(5, 3)
```

## IF

Returns the second argument if a logical expression is `TRUE` and the third argument if the expression is `FALSE`. To evaluate multiple conditions, use [`IFS`](#ifs).

For more information, refer to the [Google Sheets documentation](https://support.google.com/docs/answer/3093364).

```
IF(condition, true_value, false_value)
```

**Example**

```
IF(A1 > 10, "big", "small")
```

## IFERROR

Returns the specified value (`optional_value_if_error`) if the formula returns null due to an error; otherwise returns the result of the formula (`value`). If the second argument is absent, a blank will be returned.

For more information, refer to the [Google Sheets documentation](https://support.google.com/docs/answer/3093304)

```
IFERROR(value, [optional_value_if_error])
```

**Example**

```
IFERROR(A1, "Error in cell A1")
```

## IFNA

Returns the specified value if the formula returns null; otherwise returns the result of the formula.

For more information, refer to the [Google Sheets documentation](https://support.google.com/docs/answer/9365944).

```
IFNA(value, default_value)
```

**Example**

```
IFNA(VLOOKUP("X", A1:B10, 2, FALSE), "Not Found")
```

## IFS

Evaluates multiple conditions and returns a value that corresponds to the first true condition. Similar to [`IF`](#if).

For more information, refer to the [Google Sheets documentation](https://support.google.com/docs/answer/7014145).

```
IFS(condition1, value1, condition2, value2, ..., [default_value])
```

**Example**

```
IFS(A1 > 90, "A", A1 > 80, "B", A1 > 70, "C", TRUE, "F")
```

## ISBLANK

Returns `TRUE` if a value is blank.

For more information, refer to the [Google Sheets documentation](https://support.google.com/docs/answer/3093290).

```
ISBLANK(value)
```

**Example**

```
ISBLANK(A1)
```

## ISNUMBER

Returns `TRUE` if a value is a number.

For more information, refer to the [Google Sheets documentation](https://support.google.com/docs/answer/3093296?hl=en)

```
ISNUMBER(value)
```

**Example**

```
ISNUMBER(10)
```

## NOT

Returns the opposite of a logical value:

* `NOT(TRUE)` returns `FALSE`
* `NOT(FALSE)` returns `TRUE`

Because `0` has a logical value of `FALSE` and any non-zero numeric value has a logical value of `TRUE`, `NOT(0)` returns `TRUE` and `NOT(6)` returns `FALSE`. However, when non-numeric values are input into `NOT`, the function returns the error `#VALUE!`.

For more information, refer to the [Google Sheets documentation](https://support.google.com/docs/answer/3093305?hl=en#).

```
NOT(logical_expression)
```

**Example**

```
NOT(1+1=2)        # FALSENOT(1+4=3)        # TRUE
```

## OR

Returns `true` if any of the provided arguments are logically true, and `false` if all of the provided arguments are logically false. Can be combined with other functions like [`IF`](#if) to create advanced logical statements.

For more information, refer to the [Google Sheets documentation](https://support.google.com/docs/answer/3093306).

```
OR(condition1, condition2)
```

**Example**

```
OR(A1 < 1, A1 > 3)
```
