The request

From Rachel Adams, Customer Support Lead
Your goal
In D2:D38, use IF to return the shipping fee for each order: 0 when the subtotal in column C is at least the threshold in G1, otherwise the standard fee in G2.
- Fill
D2:D38with the right valuesnot done yet - With formulas, not typed numbersnot done yet
- Use
IFnot done yet
Your sheet
| A | B | C | D | E | F | G | H | |
|---|---|---|---|---|---|---|---|---|
| 1 | order_id | channel | subtotal | shipping | Free shipping from | 75 | ||
| 2 | 2002 | web | 719.93 | Standard fee | 7.95 | |||
| 3 | 2003 | marketplace | 302.95 | |||||
| 4 | 2004 | web | 698.00 | |||||
| 5 | 2005 | marketplace | 1061.99 | |||||
| 6 | 2007 | app | 55.96 | |||||
| 7 | 2008 | web | 56.97 | |||||
| 8 | 2009 | web | 151.95 | |||||
| 9 | 2010 | web | 1146.00 | |||||
| 10 | 2011 | app | 1870.90 | |||||
| 11 | 2012 | web | 3712.89 | |||||
| 12 | 2013 | web | 598.00 | |||||
| 13 | 2014 | app | 376.98 | |||||
| 14 | 2015 | marketplace | 35.98 | |||||
| 15 | 2016 | marketplace | 27.99 | |||||
| 16 | 2017 | web | 315.94 | |||||
| 17 | 2018 | app | 171.63 | |||||
| 18 | 2019 | web | 297.96 | |||||
| 19 | 2020 | app | 379.00 | |||||
| 20 | 2021 | marketplace | 361.96 | |||||
| 21 | 2022 | app | 605.96 | |||||
| 22 | 2023 | app | 425.84 | |||||
| 23 | 2024 | web | 77.97 | |||||
| 24 | 2025 | app | 149.98 | |||||
| 25 | 2026 | web | 448.75 | |||||
| 26 | 2027 | marketplace | 304.16 | |||||
| 27 | 2028 | marketplace | 29.99 | |||||
| 28 | 2029 | web | 818.00 | |||||
| 29 | 2030 | web | 265.94 | |||||
| 30 | 2031 | web | 105.98 | |||||
| 31 | 2033 | web | 818.99 | |||||
| 32 | 2034 | web | 501.97 | |||||
| 33 | 2035 | marketplace | 63.73 | |||||
| 34 | 2036 | web | 311.93 | |||||
| 35 | 2037 | web | 554.99 | |||||
| 36 | 2038 | app | 996.00 | |||||
| 37 | 2039 | app | 257.97 | |||||
| 38 | 2040 | marketplace | 349.00 | |||||
| 39 | ||||||||
| 40 |
Loading the editor…
Reference solution
Mote checks your result
Press Check. Each right cell becomes a firefly in your lantern.
What Rachel gets, and why
The lesson
So far every formula did the same arithmetic on every row. Business rules are different: they
depend on the row. “Free shipping from $75” means one result for some orders and another for the
rest. That is what IF is for.
The three parts of IF
=IF(test, value_if_true, value_if_false)
- test: a comparison that is either TRUE or FALSE, like
C2>=75; - value_if_true: what the cell shows when the test is TRUE;
- value_if_false: what it shows otherwise.
For the first order (subtotal in C2), the shipping fee is:
=IF(C2>=75,0,7.95)
Read it as a sentence: “if the subtotal is at least 75, shipping is 0, otherwise 7.95”.
Comparison operators
| Operator | Means |
|---|---|
= |
equal to |
<> |
not equal to |
> / < |
greater / less than |
>= / <= |
greater / less than or equal to |
The difference between > and >= is the edge of the rule. “From $75” includes $75 itself, so
the test is >=. When you translate a rule into a formula, ask what happens exactly at the
threshold; that is where most disputes with customers come from.
Text comparisons work too, with the text in double quotes: =IF(B2="web","Online","Other").
They ignore upper and lower case, so "Web" matches web.
Keep the rule in cells
The sheet already holds the rule’s inputs: the threshold in G1 and the standard fee in G2.
Point at them instead of typing 75 and 7.95 into the formula, and lock them with $ as in the
last level, because every row reads the same two cells:
=IF(C2>=$G$1,0,$G$2)
Filled down to row 38, each row tests its own subtotal (C3, C4…) against the same threshold.
When marketing tries “free shipping from $60” next month, Rachel changes G1 and every fee
updates.
Checking the result
Once the column is filled, scan it. Orders such as 2015 (35.98) and 2028 (29.99) should show
7.95; big orders should show 0. A quick sanity check like this catches a reversed test, where
< was typed instead of >= and every fee lands on the wrong orders.
Common mistakes
- Reversing the outcomes.
=IF(C2>=$G$1,$G$2,0)charges the fee to exactly the orders that should ship free. - Quotes around numbers.
"0"and"7.95"are text, not numbers. They look right but break anySUMof the column. - Unlocked inputs.
=IF(C2>=G1,0,G2)is right inD2and wrong fromD3down, where the test readsG2and the fee reads the emptyG3.
Lantern lit!
Practised: ifcomparison operatorsabsolute references
- Solved
- No hints
- First run
