Google Sheets Function: IFS

The IFS function evaluates multiple conditions and displays a value corresponding to the first true condition.

Prerequisite: understanding the IF function

Usage:

=IFS(condition1, value1)

or

=IFS(condition1, value1, condition2, value2, ...)


Example of use

The objective here will be to display the rate corresponding to the age of each person:

google sheets display rate according to age ifs

For better readability, the cells for the rates have been named from "rate1" to "rate4".

Before the introduction of the IFS function, it was necessary to nest IF functions for each additional criteria, which in this case gives us:

=IF(B2<6,rate1,IF(B2<18,rate2,IF(B2<65,rate3,rate4)))
google sheets nested if functions ifs

The IFS function avoids all these nestings and simply allows adding as many pairs (condition -> value) as necessary in sequence:

=IFS(B2<6,rate1,B2<18,rate2,B2<65,rate3,B2>=65,rate4)
google sheets function ifs conditions
If needed, you can copy the Google Sheets document (or view the document) with this example.