1. Lighthouse

Level 4 · Highlight rules, one TRUE or FALSE per row

The request

From Anna Chen, Sales Manager

“For Monday's huddle I'd like the early-October home lines coloured: green when a line is over 150, red when it's under 70. Thresholds in cells, please; I'll move them. And which lines beat the average?”

Your goal

In F2:F38, return TRUE when the line_total in column E is greater than the green threshold in K1. In G2:G38, TRUE when it is less than the red threshold in K2. In H2:H38, TRUE when it is above the average of all line totals in E2:E38 (use AVERAGE over the locked range).

  • Fill F2:H38 with the right valuesnot done yet
  • With formulas, not typed numbersnot done yet
  • Use AVERAGEnot done yet

Your sheet

Excel
The sheet for this level
ABCDEFGHIJKL
1order_item_idproductcategoryquantityline_totalgreenredabove_avgGreen when over150.00
225846Oakley Enamel Dutch OvenKitchen1109.00Red when under70.00
325847Sutton Wool Knit ThrowTextiles170.99
425848Bramble Percale QuiltTextiles3417.00
525849Oakley Brass Framed PrintDecor1104.99
625850Delancey Brass VaseDecor119.99
725851Vale Enamel Bowl SetKitchen111.99
825852Cove Cast Iron Dutch OvenKitchen221.98
925853Oakley Brass Framed PrintDecor1104.99
1025854Cove Wool Lumbar PillowTextiles152.99
1125855Tidewater Stainless Wine GlassesKitchen2338.00
1225856Birch Brass Floor MirrorDecor241.98
1325857Thatcher Oak CandleDecor235.98
1425859Ridge Soy Wax VaseDecor3327.00
1525860Oakley Jute Knit ThrowTextiles123.99
1625861Ridge Brass Bud VaseDecor225.98
1725862Fairhaven Stoneware Cutting BoardKitchen170.99
1825863Birch Brass Floor MirrorDecor120.99
1925866Vale Cashmere-Blend Knit ThrowTextiles237.98
2025870Sutton Wool Knit ThrowTextiles170.99
2125871Chester Brass Wall MirrorDecor2318.00
2225872Harbor Oak Floor MirrorDecor144.99
2325874Ridge Brass Bud VaseDecor112.99
2425875Hazel Porcelain Cutting BoardKitchen1129.00
2525876Cove Wool Lumbar PillowTextiles152.99
2625879Thatcher Oak CandleDecor116.19
2725883Sutton Wool Knit ThrowTextiles170.99
2825884Harbor Wool Knit ThrowTextiles128.99
2925885Thatcher Oak CandleDecor117.99
3025888Oakley Jute Knit ThrowTextiles123.99
3125889Harbor Oak Floor MirrorDecor289.98
3225890Cove Cast Iron Dutch OvenKitchen110.99
3325891Cove Wool Lumbar PillowTextiles2105.98
3425892Willow Acacia Knife BlockKitchen3161.97
3525895Spruce Enamel Utensil SetKitchen1239.00
3625896Hazel Linen Throw PillowTextiles241.98
3725899Willow Acacia Knife BlockKitchen4215.96
3825901Oakley Brass Framed PrintDecor6629.94
39
40

Loading the editor…

    ResultPress Check to compare F2:H38

    Mote checks your result

    Press Check. Each right cell becomes a firefly in your lantern.

    The lesson

    Conditional formatting colours a cell when a test on it is true. Behind every rule, built-in or custom, Excel evaluates a TRUE/FALSE for each cell. That’s useful to know, because it means you can write the same test in a column, check it row by row, count it, and sort or filter by it. This level does exactly that with Anna’s three rules.

    Highlight Cells Rules in Excel

    Select the line totals (E2:E38), then Home → Conditional Formatting → Highlight Cells Rules → Greater Than…, type 150 (or click K1 so the rule follows the input cell) and pick Green Fill with Dark Green Text. Repeat with Less Than…, 70, Light Red Fill. The same menu has Between, Equal To, Text that Contains, A Date Occurring and Duplicate Values. Google Sheets: Format → Conditional formatting, “Format cells if… Greater than”.

    The written-out version of the two rules:

    F2   =E2>$K$1
    G2   =E2<$K$2

    Row 4, the Bramble Percale Quilt at 417.00, is TRUE in F: green. Row 6, a Delancey Brass Vase at 19.99, is TRUE in G: red. Filled down, 8 lines come out green and 19 red. Watch the edges: four lines sit at 70.99 (rows 3, 17, 20 and 27). They are not under 70, so they get no colour. “Greater Than” and “Less Than” are strict: a line of exactly 150.00 would stay white. If Anna means “150 or more”, the rule is >=.

    Top/Bottom and Above Average

    Conditional Formatting → Top/Bottom Rules has Top 10 Items, Top 10%, Bottom 10 Items, Bottom 10%, Above Average and Below Average. Above Average compares each cell with the average of the whole selection:

    H2   =E2>AVERAGE($E$2:$E$38)

    The average of the 37 lines is 111.34, so 9 lines are above it. The range is locked with $ on both ends: every row must compare with the same average. Notice how few lines beat the average: a handful of big lines (629.94, 417.00) pull it up. That’s normal for order values, and a reason to look at the median too. A Top 10% rule ranks the items and colours the largest tenth of them by count; it does not mean “lines above 90% of the maximum”.

    Data bars, colour scales and icon sets

    These don’t test; they draw.

    • Data Bars put a bar inside each cell, longest for the largest value. Good for quantities at a glance. By default the shortest bar is the minimum, so check that a small value doesn’t look like zero.
    • Color Scales shade from one colour to another, low to high.
    • Icon Sets put an arrow or traffic light in each cell. The defaults split the range by percent; for a rating scale, edit the rule (Manage Rules → Edit) and set the type to Number: green when ≥ 5, yellow when ≥ 3, red otherwise. Written out, that is =IFS(E2>=5,"green",E2>=3,"yellow",TRUE,"red").

    Manage Rules shows every rule on the sheet, the range it applies to and the order they run in. When two rules colour the same cell, the one higher in the list wins; tick Stop If True to end the checks there.

    Common mistakes

    • Unlocked thresholds or ranges in a written-out rule: AVERAGE(E2:E38) filled down slides with the row.
    • Strict versus inclusive edges: “over 150” is >, “150 or more” is >=.
    • Typing the threshold into the rule instead of pointing at a cell, then forgetting to update one of three rules when it changes.
    • Formatting text that looks like numbers: "120" stored as text fails >150 and <70 both ways, so it never gets a colour.

    Pick what may run on this site. You can change this any time from "Cookie settings" at the bottom of every page.