1. Lighthouse

Level 1 · Line totals with cell references

The request

From Brian Mitchell, Finance Analyst

“I exported the first twelve order lines and need what each line actually earned. Can you fill in line_total for every row? Remember the discount: 10 means 10% off.”

Your goal

In F2:F13, compute each line's total with a formula: quantity times unit_price, minus the discount. discount_pct holds percentages, so 10 means 10% off.

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

Your sheet

Excel
The sheet for this level
ABCDEFG
1order_item_idproductquantityunit_pricediscount_pctline_total
21Bramble Ceramic Floor Lamp931.990
32Vale Enamel Bowl Set311.990
43Vale Enamel Bowl Set411.990
54Chester Brass Wall Mirror1149.000
65Delancey Brass Vase219.990
76Pine Glass Candle Holder Set225.990
87Willow Acacia Knife Block153.990
98Sable Linen Table Lamp192.9910
109Marlow Glass Wall Sconce1349.0010
1110Sable Linen Table Lamp192.9910
1211Birch Brass Floor Mirror220.9910
1312Ridge Ceramic Chandelier1149.0010
14
15

Loading the editor…

    ResultPress Check to compare F2:F13

    Mote checks your result

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

    The lesson

    A spreadsheet cell can hold a value you type, like 12 or Lamp, or a formula: an instruction that starts with = and computes a value from other cells. Formulas are why analysts use spreadsheets at all. Change a quantity, and every total that depends on it updates by itself.

    Cell references

    Every cell has an address: its column letter and its row number. In this sheet the first order line is in row 2, so its quantity sits in C2 and its unit price in D2. A formula that multiplies them is:

    =C2*D2

    Type it in F2 and press Enter. The cell shows the result (9 × 31.99 = 287.91), and the formula bar above the grid still shows =C2*D2. That difference matters: the cell holds the instruction, not the number. If someone corrects the quantity in C2, F2 changes too.

    The arithmetic operators are the ones you know: + add, - subtract, * multiply, / divide, and ^ for powers.

    Percentages and brackets

    discount_pct stores a discount as a whole number: 10 means 10% off. To get the price the customer actually pays, keep the remaining share: 1 - 10/100, which is 0.9. So the full line total is:

    =C2*D2*(1-E2/100)

    Excel follows the usual order of operations: brackets first, then ^, then * and /, then + and -. Without the brackets, =C2*D2*1-E2/100 computes C2*D2*1 first and then subtracts a tiny 0.1, which is almost no discount at all. When a formula mixes + or - with * or /, add brackets so the intent is visible.

    Filling a formula down

    You need the same calculation on twelve rows. Writing twelve formulas by hand is slow and error prone. Instead, write it once in F2, then fill it down:

    • select F2:F13 (click F2, then Shift+click F13) and press Ctrl+D (Cmd+D on a Mac), or
    • drag the small square on the corner of F2 down to row 13, or
    • on a phone, select the cell and tap Fill down.

    Excel copies the formula and moves every reference with it: F3 gets =C3*D3*(1-E3/100), F4 gets row 4, and so on. These are relative references, and they are what makes one formula work for a whole column. Level 3 shows what to do when a reference must not move.

    Common mistakes

    • Typing the result instead of a formula. 287.91 is right today and wrong tomorrow. The checker asks for formulas for exactly this reason.
    • Forgetting the =. Without it, Excel stores the text C2*D2 and shows it as a label.
    • Treating the percentage as a fraction. =C2*D2*(1-E2) subtracts 10, not 10%, and gives a negative total.
    • Spaces in the wrong place. = C2 * D2 works, but =C 2 does not: an address is one word.

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