> 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/if.md).

# IF

The IF function in Shedmate performs a logical test and returns a specified value if the test is true and another specified value if the test is false.

### Syntax:

```
IF(condition, value_if_true, value_if_false)
```

### Parameters:

```
condition (required): The condition to be tested. It can be any expression that results in true (TRUE) or false (FALSE).
```

```
value_if_true (required): The value to be returned if the condition is true.
```

```
value_if_false (required): The value to be returned if the condition is false.
```

### Usage example:

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