> For the complete documentation index, see [llms.txt](https://shedmate.gitbook.io/shedmate-help/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://shedmate.gitbook.io/shedmate-help/setting-up-shedmate/costing-database-and-pricing-calculations/variables/logical-operators/and.md).

# AND

The AND function in Shedmate returns TRUE if all the specified conditions are true; otherwise, it returns FALSE. It is often used within the IF function to perform complex logical tests.

### Syntax:

```
IF(AND(condition1, condition2, ...), value_if_true, value_if_false)
```

### Parameters:

{% code overflow="wrap" %}

```
condition1, condition2, ... (required): The conditions to be tested within the AND function. Each condition can be any expression that results in TRUE or FALSE. The function can accept between 1 and 255 conditions.
```

{% endcode %}

{% code overflow="wrap" %}

```
value_if_true (mandatory): The value to be returned if all the conditions of the AND function are true.
```

{% endcode %}

{% code overflow="wrap" %}

```
value_if_false (required): The value to be returned if any of the conditions of the AND function are false.
```

{% endcode %}

### Usage example:

<figure><img src="https://lh7-us.googleusercontent.com/docsz/AD_4nXexEuefH4GKuLXlban1QssxgeVR8CFT8u3JENS7ful_xqtDkV2s-C2oWr_ohglDYzzNqDh70RGTv5T68_pnpJshK6UMO2cm9t9N7MaXEYqQsEghEm5hp80tZ7o8RRd2GTwXAovtsqCwe2pu-p7pO8UVatnZ?key=ft9PKSxNRRf2UuAft3mHlg" alt=""><figcaption></figcaption></figure>
