One question is not enough
You know KDYŽ(B2>3;"practice";"ok"). What if you want three levels: super (1), ok (2), practice (3+)? Nested KDYŽ: in the “otherwise” place you put another KDYŽ.
=KDYŽ(B2=1;"super";KDYŽ(B2=2;"ok";"practice"))
English: =IF(B2=1,"super",IF(B2=2,"ok","practice"))
The Sorter marks data with this — the chart then shows only numbers, the text column tells you what to do with them.
Three levels for grades
-
Sheet
Znamky. In C1 writeStatus. C2 formula (Czech):=KDYŽ(B2=1;"super";KDYŽ(B2=2;"ok";"practice")) -
نسخ C2 to C6. Maths 2 →
ok. English 3 →practice. History 1 →super. -
Change B4 from 3 to 1. C4 jumps to
super. Nested KDYŽ reacts to the grade change. -
Sheet
Kapesne. Column EDay status. E2:=KDYŽ(D2<0;"minus";KDYŽ(D2=0;"zero";"plus"))(D = Left after the day.) Drag down.
-
Filter on column E: only
minus— which days did you finish in minus?
Keep nesting at max two levels (three results). More than three levels → VLOOKUP/XLOOKUP or a rules table is قريباً. Readability matters more than pride in one giant formula.
Order of conditions
Test from the most special. First =1, then =2, the rest practice. If you first did >2, a two would fall into “practice” wrongly.
For pocket money: first <0 (minus), then =0, otherwise plus.
What often goes wrong
Missing bracket. Every KDYŽ has three parts in (). Count the brackets in the formula bar.
Semicolon vs. comma. Czech account: ;. English: ,. When #NAME?, check the function language.
Text without quotes. super must be "super", otherwise the sheet looks for a cell named super.
🏫 Grade average — column C
Status next to the grade — the teacher sees the table and a word summary. The average stays in B8 from numbers, not from text C. Chart from B, not from C.
💰 Pocket money — minus days
Filter E = minus. How many such days? Later COUNTIF. Today a filter and eyes are enough.
📊 Class survey — categories
Nested KDYŽ: answer nothing → no snack, otherwise with snack. A helper column before the summary — not instead of the summary table.
🏆 Mini dashboard — numbers only
The dashboard shows average and totals, not the Status column. Nested KDYŽ is for work on the Znamky/Kapesne sheet.
Now you 💪
First: column C on grades — three levels, copied formula.
Second: pocket money — minus/zero/plus. Filter on minus.
Check: Every grade 1–3 has the right text. Changing B2 changes C2. The brackets fit.
What to take from this lesson
- Nested KDYŽ = in “otherwise” another KDYŽ.
- Three results = two nesting levels max.
- Test from the most special condition.
© 2026 Ing. Martin Polak / AlgoRhino · شروط استخدام المحتوى