Excel tutorial
/

Functions

Intermediate

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.

Книга1 - Excel
—☐✕
C3fx=ЕСЛИМН(B3>=86;5;B3>=71;4;B3>=56;3;ИСТИНА;2)
ABCD
1StudentScoreGrade
2Aziz925
3Dilnoza7841
4Javohir643
5Kamola492
6Sardor865
7
Готово
Score 78: the first test (>=86) is FALSE, the second (>=71) is TRUE — IFS stops there and returns 4

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.

Книга1 - Excel
—☐✕
ФайлГлавнаяВставкаРазметка страницыФормулыДанныеРецензированиеВидСправка
Вставить функциюАвтосуммаФинансовыеЛогическиеТекстовыеДата и времяСсылки и массивыМатематические
Библиотека функций
Диспетчер имён
Определённые имена
C2fx
ABCD
1StudentScoreGrade
2Aziz92
3Dilnoza78
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.

Книга1 - Excel
—☐✕
C2fx
ABCD
1StudentScoreGrade
2Aziz92
3Dilnoza78
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.

Книга1 - Excel
—☐✕
C3fx=ЕСЛИМН(B3>=100000000;7%;B3>=50000000;5%;ИСТИНА;2%)
ABCDE
1ManagerSalesRateBonus
2Bekzod124 000 0007%8 680 000
3Malika67 500 0005%3 375 000
4Gulnora38 200 0002%764 000
5Sardor100 000 0007%7 000 000
6
Готово
Sardor sold exactly 100 mln: thanks to >= he gets 7%. With > it would be 5%

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")

Книга1 - Excel
—☐✕
C3fx=ЕСЛИМН(B3>=$F$2;"High";B3>=$F$3;"Medium";ИСТИНА;"Low")
ABCDEFG
1BranchPlan doneLevelLevelThreshold
2Chilanzar112%HighHigh100%
3Yunusabad86%MediumMedium80%1
4Sergeli71%Low
5Samarkand103%High
6
Готово
Change F3 to 85% and Yunusabad, along with every other branch, is re-rated instantly
Книга1 - Excel
—☐✕
B2fx=ЕСЛИМН(A2>=56;3;A2>=71;4;A2>=86;5;ИСТИНА;2)
ABCD
1ScoreWrong orderRight order
292315
37534
46033
5
Готово
Same conditions, different order: scores 92 and 75 are graded wrongly

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?

Книга1 - Excel
—☐✕
Буфер обмена
Шрифт
Выравнивание
Число
Стили
Ячейки
Редактирование
✕✓fx
ABCDEFGHIJKLMNOPQRSTUVWX
1StudentScoreGrade
2Aziz92
3Dilnoza78
4Javohir64
5Kamola49
6Sardor86
7
8
9
10
Лист1
Готово

Has ExcelLab been useful?

Support the project and help us release new lessons and exercises.

Support us
Previous

83 / 154