IFS function.Specify multiple conditions and get the value corresponding to the first matching condition.(Microsoft Excel)
Specify multiple conditions and get the value corresponding to the first matching condition.
The IFS function is an extended version of the IF function.
It is useful when there are multiple decision conditions and results.
This section introduces the specifications of the IFS function and the situations in which it has advantages over the IF function.
How it works
=IFS(logical_test1,value_if_true1, to logical_test127,value_if_true127)
Argument | Omission | Specify |
---|---|---|
logical_test1 to 127 | logical_test1 is required. | Judgment conditions. |
value_if_true1 to 127 | value_if_true1 is required. | Result when the corresponding logical_test is TRUE. |
Usage Examples and Comparison with IF Function.
This is useful when there are multiple results.
For example, consider an example of displaying ranks according to scores.
Score | Rank |
---|---|
More than 80 | A |
More than 60 | B |
More than 40 | C |
Less than 39 | Retest. |
When writing with IF function, the formulas become complicated because multiple IF functions are nested.
=IF(Score cell>=80,"A",IF(Score cell>=60,"B",IF(Score cell>=40,"C","Retest")))
The IFS function requires only one function, making the formula easy to read.
=IFS(Score cell>=80,"A",Score cell>=60,"B",Score cell>=40,"C",TRUE,"Retest")
Note that the last conditional expression in the IFS function must always be TRUE in order to match.
If all conditions are not met, the result will be a #N/A error.
Spill
If you specify the argument "logical_test" the cell range, it will be Spil.
---
Discussion
New Comments
No comments yet. Be the first one!