Logical Functions
Advanced

Nested IF: why the order of tests matters

Test the smallest band first and the bigger ones are never reached.

Task:

Volume discount: 5% over 500, 10% over 1,000 and 15% over 2,000. The draft formula tests over 500 first, so nobody ever gets more than 5%. In C2:C7 write the discount rate correctly.

Interactive Spreadsheet

Hints

+5 XPno-hints bonus

Solve it on your own to keep the bonus. Each hint gets one step closer to the formula.

The data in this exercise

This is the grid you start with. Cell references in the task — B6, C2 — point at the row numbers and column letters below.

7 rows × 3 columns6 cells you fill in
ABC
1OrderValueDiscount
2O-11450
3O-12650
4O-131200
5O-142500
6O-151000
7O-162000.01
What this exercise teachesMay contain the answer

Every order over 2,000 is also over 500, so a formula that asks about 500 first answers 5% and never looks further. With greater-than thresholds, go from the largest down; with less-than thresholds, from the smallest up. 1,000 exactly is not over 1,000, so it gets 5%.