Learning Excel: EN en OF (AND/OR)
EN, OF en NIET
Op het blad Zwemlessen houdt Dirk de diploma's bij. "In het diepe bad mag je pas met diploma A én B. Voor de wedstrijd volstaat B, of twintig baantjes." Twee voorwaarden tegelijk: tijd voor EN en OF.
EN
EN krijgt een paar tests en geeft WAAR als ze allemaal kloppen. Is er één ONWAAR, dan is het hele antwoord ONWAAR.
In F2 staat =EN(C2;D2). Ella heeft diploma A, maar niet B, dus Ella mag nog niet in het diepe bad.
=AND(C2,D2)
| A | B | C | D | E | F | |
|---|---|---|---|---|---|---|
| 1 | Kind | Leeftijd | Diploma A | Diploma B | Baantjes | Diepe bad |
| 2 | Ella | 7 | TRUE | FALSE | 12 | FALSE |
| 3 | Ilias | 9 | TRUE | TRUE | 20 | |
| 4 | Zoë | 6 | FALSE | FALSE | 4 | |
| 5 | Bas | 10 | TRUE | TRUE | 26 | |
| 6 | Amira | 8 | TRUE | FALSE | 15 | |
| 7 | Tuur | 11 | TRUE | TRUE | 18 | |
| 8 | Nina | 9 | FALSE | FALSE | 8 | |
| 9 | Senne | 12 | TRUE | TRUE | 30 | |
| 10 |
OF en NIET
OF geeft WAAR als minstens één test klopt. =OF(E2>=20;D2) zegt: twintig baantjes of diploma B, één van de twee is genoeg.
NIET draait een logische waarde om: =NIET(C2) is WAAR voor wie diploma A nog niet heeft.
In an English Excel
Is your Excel in English? Then the functions have other names, and there is often a comma between the arguments instead of a semicolon.
- EN
- AND
- OF
- OR
Try it yourself
Mag elk kind in het diepe bad? Zet in F2 TRUE als het beide diploma's heeft, en trek door tot F9.
| A | B | C | D | E | F | G | |
|---|---|---|---|---|---|---|---|
| 1 | Kind | Leeftijd | Diploma A | Diploma B | Baantjes | Diepe bad | |
| 2 | Ella | 7 | TRUE | FALSE | 12 | ||
| 3 | Ilias | 9 | TRUE | TRUE | 20 | ||
| 4 | Zoë | 6 | FALSE | FALSE | 4 | ||
| 5 | Bas | 10 | TRUE | TRUE | 26 | ||
| 6 | Amira | 8 | TRUE | FALSE | 15 | ||
| 7 | Tuur | 11 | TRUE | TRUE | 18 | ||
| 8 | Nina | 9 | FALSE | FALSE | 8 | ||
| 9 | Senne | 12 | TRUE | TRUE | 30 | ||
| 10 |
Ready for more?
The full lesson has 5 exercises, from easy to challenging, with hints, points and a streak you can build.
Start the lesson