The IFS function
Checks several conditions in order and returns the value for the first one that is TRUE. Use TRUE as the last test for "everything else".
Syntax
IFS(logical_test1, value_if_true1, [logical_test2, value_if_true2], ...)- logical_test1
- The first condition.
- value_if_true1
- The result when the first condition is TRUE.
- logical_test2, value_if_true2 (optional)
- More condition and result pairs, up to 127.
Examples
C1
=IFS(1A2>=90,2"High",3A2>=60,4"Mid",5TRUE,6"Low")| A | B | C | |
|---|---|---|---|
| 1 | Score | Mid | |
| 2 | 62 |
In plain words: 1If the score in A2 is 90 or more, 2show High. 3If it is 60 or more, 4show Mid. 5In every other case, 6show Low.
C1=IFS(A2<50,"Low",A2<80,"Mid",A2>=80,"High")
| A | B | C | |
|---|---|---|---|
| 1 | Score | Mid | |
| 2 | 62 |