The IF function is one of the most popular functions in Calconic, and it allows you to make logical comparisons between a value and what you expect. You can write conditional formulas using our Basic Formula Editor or Rich Formula Editor. This article explains how to write confitional (IF) formulas using the **Rich Formula Editor**. If you want to understand conditional formula syntax and write formulas using **Basic Formula Editor** click here.

### To write conditional formula using **Rich Formula Editor**:

- Select Formula field where you want to apply conditional formula.
- Click
**Open Rich Text Editor** button bellow Basic Formula Editor (input field for formula line).
- In the formula editor window, type in
**IF** to use the function or click on the **IF** button located below the input field.
- In the
**IF** input field type in your condition.
- In the
**THAN** input field type in what happens if the condition is met.
- In the
**ELSE** input field type in what happens if the condition is not met.
- You can also use results from previous formulas or values entered by the user. You can see the available choices below the formula input field.

### Useful operators working with conditional formulas:

**AND (&)** can be used in an IF function when there are more than one simultaneous conditions. For example:

IF #2 >= 1 AND #3 == 0 THEN (#4+12) ELSE (#5)

((#2 >= 1 & #3 == 0) ? (#4+12) : (#5))

**OR (|)** can be used in an IF function if there are multiple conditions and the user wants to use a formula if either of them meet the requirements, which should be written in THAN. If none of the conditions are met, the formula in ELSE will be used.

### Other operators:

**==** - Both numbers or inputs are equal.

**!=** - The numbers or inputs are unequal.

**>** - The number or input is greater than the number it is being compared to.

**<** - The number or input is smaller than the number it is being compared to.

**>=** - The number or input is greater or equals to the number it is being compared to.

**<=** - The number or input is smaller or equals to the number it is being compared to.