Excel IFS function: multiple conditions instead of nested IFs
IFS checks conditions in order and returns the value for the first one that is met. Grades, bonus tiers, thresholds in cells and the #N/A trap.
IFS tests conditions from left to right, one by one, and returns the value for the first condition that is met. It is a clean, readable replacement for a chain of nested IFs.
When you need it: grading by score (86+ gives 5, 71+ gives 4, 56+ gives 3), a bonus rate by sales volume, a debt category by days overdue. With three or four tiers, IF(…,IF(…,IF(…))) turns into a maze of parentheses; in IFS each tier is a separate pair.
IFS is available in Excel 2019 and Microsoft 365.
| A | B | C | D | |
|---|---|---|---|---|
| 1 | Student | Score | Grade | |
| 2 | Aziz | 92 | 5 | |
| 3 | Dilnoza | 78 | 41 | |
| 4 | Javohir | 64 | 3 | |
| 5 | Kamola | 49 | 2 | |
| 6 | Sardor | 86 | 5 | |
| 7 |
Syntax
=ЕСЛИМН(logical_test1; value_if_true1; [logical_test2; value_if_true2]; ...)
- logical_test1 — the first condition:
B2>=86. - value_if_true1 — what to return if it is met: a number, text (
"Excellent"), a formula or a reference. - logical_test2, value_if_true2 … — more pairs, up to 127.
IFS has no “else” argument. Use TRUE as the last test instead: …,TRUE,2) — “in every other case, 2”.
Step by step: entering an IFS formula
1
Select C2 for the result.
2
Формулы → Логические → pick IFS.
| A | B | C | D | |
|---|---|---|---|---|
| 1 | Student | Score | Grade | |
| 2 | Aziz | 92 | ||
| 3 | Dilnoza | 78 | ||
| 4 | ||||
| 5 |
3
Enter the pairs starting from the strictest condition: Logical_test1 — B2>=86, Value_if_true1 — 5, then B2>=71 and 4 … The last pair is TRUE and 2. New boxes appear as you fill them in.
| A | B | C | D | |
|---|---|---|---|---|
| 1 | Student | Score | Grade | |
| 2 | Aziz | 92 | ||
| 3 | Dilnoza | 78 | ||
| 4 | ||||
| 5 |
4
Click OK and fill the formula down with the fill handle. The finished formula: =ЕСЛИМН(B2>=86;5;B2>=71;4;B2>=56;3;ИСТИНА;2).
Example 1: bonus rate by sales volume
A manager who sells over 100 mln soum gets 7%, over 50 mln — 5%, everyone else — 2%. With nested IFs that is =ЕСЛИ(B2>=100000000;7%;ЕСЛИ(B2>=50000000;5%;2%)). With IFS each tier reads on its own:
=ЕСЛИМН(B2>=100000000;7%;B2>=50000000;5%;ИСТИНА;2%)
The bonus amount is a simple product: =B2*C2.
| A | B | C | D | E | |
|---|---|---|---|---|---|
| 1 | Manager | Sales | Rate | Bonus | |
| 2 | Bekzod | 124 000 000 | 7% | 8 680 000 | |
| 3 | Malika | 67 500 000 | 5% | 3 375 000 | |
| 4 | Gulnora | 38 200 000 | 2% | 764 000 | |
| 5 | Sardor | 100 000 000 | 7% | 7 000 000 | |
| 6 |
Example 2: thresholds stored in cells
If your manager lowers the threshold from 80% to 75% tomorrow, don’t go hunting through formulas. Put the thresholds in separate cells and lock them with $:
=ЕСЛИМН(B2>=$F$2;"High";B2>=$F$3;"Medium";ИСТИНА;"Low")
| A | B | C | D | E | F | G | |
|---|---|---|---|---|---|---|---|
| 1 | Branch | Plan done | Level | Level | Threshold | ||
| 2 | Chilanzar | 112% | High | High | 100% | ||
| 3 | Yunusabad | 86% | Medium | Medium | 80%1 | ||
| 4 | Sergeli | 71% | Low | ||||
| 5 | Samarkand | 103% | High | ||||
| 6 |
| A | B | C | D | |
|---|---|---|---|---|
| 1 | Score | Wrong order | Right order | |
| 2 | 92 | 31 | 5 | |
| 3 | 75 | 3 | 4 | |
| 4 | 60 | 3 | 3 | |
| 5 |
Pro level: complex conditions and swapping in a table
- AND/OR inside a test. “Score 86+ and attendance 90%+ earns a grant”:
=ЕСЛИМН(И(B2>=86;C2>=0,9);"Grant";B2>=86;"Excellent";ИСТИНА;"—"). The narrowest condition goes first. - A formula as the result. You can return a calculation instead of a value:
=ЕСЛИМН(B2>=100000000;B2*7%;ИСТИНА;B2*2%). - Many tiers — use a table. Don’t keep more than 6–7 thresholds inside a formula. Put the thresholds and results in a small table (ascending) and use
=ПРОСМОТРX(B2;$E$2:$E$5;$F$2:$F$5;;-1): -1 means “exact match or the next smaller value”. In older versions=ВПР(B2;$E$2:$F$5;2;ИСТИНА)does the same job. - Exact values — use SWITCH. When the test is “equals” (code → name), SWITCH is shorter than IFS.
Try it in the simulator
Type =ЕСЛИМН(B2>=86;5;B2>=71;4;B2>=56;3;ИСТИНА;2) in C2 and fill it down to C6. Then enter 56 in B5 — how does Kamola’s grade change?
| A | B | C | D | E | F | G | H | I | J | K | L | M | N | O | P | Q | R | S | T | U | V | W | X | |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| 1 | Student | Score | Grade | |||||||||||||||||||||
| 2 | Aziz | 92 | ||||||||||||||||||||||
| 3 | Dilnoza | 78 | ||||||||||||||||||||||
| 4 | Javohir | 64 | ||||||||||||||||||||||
| 5 | Kamola | 49 | ||||||||||||||||||||||
| 6 | Sardor | 86 | ||||||||||||||||||||||
| 7 | ||||||||||||||||||||||||
| 8 | ||||||||||||||||||||||||
| 9 | ||||||||||||||||||||||||
| 10 |
Has ExcelLab been useful?
Support the project and help us release new lessons and exercises.