# IFS Function

The IFS function is one of the logical functions. It checks whether one or more conditions are met and returns a value that corresponds to the first TRUE condition.

The IFS function syntax is:

IFS(logical_test1, value_if_true1, [logical_test2, value_if_true2], ...)

where

logical_test1 is the first condition to be evaluated to TRUE or FALSE.

value_if_true1 is the value that returns if the logical_test1 is TRUE.

logical_test2, value_if_true2, ... are additional conditions and values to return. These arguments are optional. You can check up to 127 conditions.

The values can be entered manually or included into the cell you make reference to.

To apply the IFS function,

1. select the cell where you wish to display the result,
2. click the Insert function icon situated at the top toolbar,
   or right-click within a selected cell and select the Insert Function option from the menu,
   or click the icon situated at the formula bar,
3. select the Logical function group from the list,
4. click the IFS function,
5. enter the required arguments separating them by commas,
6. press the Enter button.

The result will be displayed in the selected cell.

For example:

There are the following arguments: logical_test1 = A1<100, value_if_true1 = 1, logical_test2 = A1>100, value_if_true2 = 2, where A1 is 120. The second logical expression is TRUE. So the function returns 2.