1. Lighthouse

Level 8 · Boss: replay the order-entry log through the new rules

The request

From Jennifer Castillo, Support Team Lead

“Support keys order corrections into the entry sheet by hand, and IT is about to lock it down: whole-number quantities above zero, channel picked from a list. Before they do, replay the last batch: which entries would the form have refused, and why? Big lines that pass get a second look, so flag those too.”

Your goal

Step 1 of 3. In G2:G37, write the custom whole-number rule for the quantity in column E: TRUE when it is a number (ISNUMBER), whole (equal to its INT) and greater than 0. In H2:H37, write the list rule for the channel in column C: TRUE when it appears in the allowed list K2:K4 (COUNTIF over the locked list, greater than 0).

  • Fill G2:H37 with the right valuesnot done yet
  • With formulas, not typed numbersnot done yet
  • Use AND ISNUMBER INT COUNTIFnot done yet

Step 1 · your sheet

Excel
The sheet for this level
ABCDEFGHIJKLM
1entry_idorder_idchannelproduct_idquantityunit_priceqty_okchannel_okstatusbig_lineAllowed channels
2138006481app142136.99web
3138016481app172218.99app
4138026482marketplace1684149.00marketplace
5138036482marketplace1381199.00
6138046482marketplace142136.99Big line over500.00
7138056483app150118.99
8138066483app2161379.00Rows rejected
9138076484web141613.99
10138086484web1312349.00
11138096485marketplace178170.99
12138106485marketplace145210.99
13138116486app1592179.00
14138126486app175384.99
15138136487app1312349.00
16138146487app171227.99
17138156487app164252.99
18138166488phone122129.99
19138176489web1873149.00
20138186489web1321189.00
21138196490marketplace1621.523.99
22138206490marketplace164452.99
23138216490marketplace186120.99
24138226490marketplace1572109.00
25138236490marketplace1551169.00
26138246491website145-410.99
27138256491web1771169.00
28138266491web2001179.00
29138276491web 1942149.00
30138286491web164152.99
31138296492web215193.99
32138306492web180119.99
33138316493app1102179.00
34138326494web1091999.00
35138336494web1190259.00
36138346495app145110.99
37138356496web178170.99
38
39

Loading the editor…

    ResultPress Check to compare G2:H37

    Mote checks your result

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

    Step 2 · your sheet

    Excel
    The sheet for this level
    ABCDEFGHIJKLM
    1entry_idorder_idchannelproduct_idquantityunit_priceqty_okchannel_okstatusbig_lineAllowed channels
    2138006481app142136.99TRUETRUEweb
    3138016481app172218.99TRUETRUEapp
    4138026482marketplace1684149.00TRUETRUEmarketplace
    5138036482marketplace1381199.00TRUETRUE
    6138046482marketplace142136.99TRUETRUEBig line over500.00
    7138056483app150118.99TRUETRUE
    8138066483app2161379.00TRUETRUERows rejected
    9138076484web141613.99TRUETRUE
    10138086484web1312349.00FALSETRUE
    11138096485marketplace178170.99TRUETRUE
    12138106485marketplace145210.99TRUETRUE
    13138116486app1592179.00TRUETRUE
    14138126486app175384.99TRUETRUE
    15138136487app1312349.00TRUETRUE
    16138146487app171227.99TRUETRUE
    17138156487app164252.99TRUETRUE
    18138166488phone122129.99TRUEFALSE
    19138176489web1873149.00TRUETRUE
    20138186489web1321189.00TRUETRUE
    21138196490marketplace1621.523.99FALSETRUE
    22138206490marketplace164452.99TRUETRUE
    23138216490marketplace186120.99TRUETRUE
    24138226490marketplace1572109.00TRUETRUE
    25138236490marketplace1551169.00TRUETRUE
    26138246491website145-410.99FALSEFALSE
    27138256491web1771169.00TRUETRUE
    28138266491web2001179.00TRUETRUE
    29138276491web 1942149.00TRUEFALSE
    30138286491web164152.99TRUETRUE
    31138296492web215193.99TRUETRUE
    32138306492web180119.99TRUETRUE
    33138316493app1102179.00TRUETRUE
    34138326494web1091999.00TRUETRUE
    35138336494web1190259.00FALSETRUE
    36138346495app145110.99TRUETRUE
    37138356496web178170.99TRUETRUE
    38
    39

    Loading the editor…

      ResultPress Check to compare I2:I37, L8

      Mote checks your result

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

      Step 3 · your sheet

      Excel
      The sheet for this level
      ABCDEFGHIJKLM
      1entry_idorder_idchannelproduct_idquantityunit_priceqty_okchannel_okstatusbig_lineAllowed channels
      2138006481app142136.99TRUETRUEokweb
      3138016481app172218.99TRUETRUEokapp
      4138026482marketplace1684149.00TRUETRUEokmarketplace
      5138036482marketplace1381199.00TRUETRUEok
      6138046482marketplace142136.99TRUETRUEokBig line over500.00
      7138056483app150118.99TRUETRUEok
      8138066483app2161379.00TRUETRUEokRows rejected6
      9138076484web141613.99TRUETRUEok
      10138086484web1312349.00FALSETRUEbad quantity
      11138096485marketplace178170.99TRUETRUEok
      12138106485marketplace145210.99TRUETRUEok
      13138116486app1592179.00TRUETRUEok
      14138126486app175384.99TRUETRUEok
      15138136487app1312349.00TRUETRUEok
      16138146487app171227.99TRUETRUEok
      17138156487app164252.99TRUETRUEok
      18138166488phone122129.99TRUEFALSEbad channel
      19138176489web1873149.00TRUETRUEok
      20138186489web1321189.00TRUETRUEok
      21138196490marketplace1621.523.99FALSETRUEbad quantity
      22138206490marketplace164452.99TRUETRUEok
      23138216490marketplace186120.99TRUETRUEok
      24138226490marketplace1572109.00TRUETRUEok
      25138236490marketplace1551169.00TRUETRUEok
      26138246491website145-410.99FALSEFALSEbad quantity
      27138256491web1771169.00TRUETRUEok
      28138266491web2001179.00TRUETRUEok
      29138276491web 1942149.00TRUEFALSEbad channel
      30138286491web164152.99TRUETRUEok
      31138296492web215193.99TRUETRUEok
      32138306492web180119.99TRUETRUEok
      33138316493app1102179.00TRUETRUEok
      34138326494web1091999.00TRUETRUEok
      35138336494web1190259.00FALSETRUEbad quantity
      36138346495app145110.99TRUETRUEok
      37138356496web178170.99TRUETRUEok
      38
      39

      Loading the editor…

        ResultPress Check to compare J2:J37

        Mote checks your result

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

        The lesson

        The log and the rules

        The sheet holds 36 order-entry rows from support’s correction sheet, as they were typed: entry id, order, channel, product, quantity and unit price. IT’s new form will enforce two rules, and Jennifer wants to know what they would have done to this batch before switching them on.

        The inputs sit on the right: the allowed channels in K2:K4 and the “big line” threshold in L6. Nothing in the data has been fixed. You’re finding the problems, not hiding them.

        Step 1: one column per rule

        In Excel, the quantity rule is Data → Data Validation → Allow: Whole number, Data: greater than, Minimum: 0. Written as a Custom rule that you can also run over old rows:

        G2   =AND(ISNUMBER(E2),E2=INT(E2),E2>0)

        Each part catches a different entry. ISNUMBER fails the "2" in E10, pasted in as text. E2=INT(E2) fails the 1.5 in E21: INT(1.5) is 1. E2>0 fails the 0 in E35 and the -4 in E26. Leave out any one of them and that row slips through.

        The channel rule is Allow: List, Source: =$K$2:$K$4, which gives the cell a drop-down. Its formula form counts the entry in the list:

        H2   =COUNTIF($K$2:$K$4,C2)>0

        phone in C18 and website in C26 aren’t on the list. C29 looks like web but is "web " with a trailing space, so it doesn’t match either. In the real form, the drop-down stops all three. Note that both the List rule and COUNTIF ignore case: Web would pass. If case matters, use SUMPRODUCT(--EXACT($K$2:$K$4,C2))>0.

        Step 2: a reason per row

        I2   =IFS(NOT(G2),"bad quantity",NOT(H2),"bad channel",TRUE,"ok")
        L8   =COUNTIF(I2:I37,"<>ok")

        IFS returns the first reason that applies, like a form that stops at the first field that fails. Row 26 fails both rules and reports bad quantity. L8 counts 6 rejected entries: rows 10, 21, 26 and 35 for quantity, 18 and 29 for channel.

        This is also where the error messages come from. For each rule, write what the person typing should do, and put it in the rule’s Error Alert tab (Style: Stop): “Quantity must be a whole number above 0” and “Pick a channel from the list”. An Input Message (“Whole units, e.g. 2”) prevents most of these before they happen.

        Step 3: the highlight rule

        Lines over $500 that pass get a second look. In Excel, select A2:F37, then Conditional Formatting → New Rule → Use a formula:

        J2   =AND($I2="ok",$E2*$F2>$L$6)

        The columns are locked so every cell in a row reads that row’s status, quantity and price; the rows are free so each row reads its own. Three lines light up: row 4 (4 × 149.00 = 596.00), row 15 (2 × 349.00 = 698.00) and row 34 (999.00). Row 10 would be a fourth without the status test: the text "2" times 349.00 is 698.00, because arithmetic converts numeric text.

        Thinking like an analyst

        Before switching validation on, a replay like this answers three questions:

        • Are the rules right? If half the batch failed on a legitimate value (say, a quantity of 0 for a pure price correction), the rule needs changing, not the people.
        • What’s already broken? Validation only checks new entries; the six rows here stay as they are unless someone fixes them. Circle Invalid Data shows them in Excel.
        • What gets around it? Paste replaces validation, so a sheet that’s pasted into needs its rules backed by a check column like these, or a protected sheet.

        Common mistakes

        • E2>0 alone as the quantity rule: "2" and 1.5 both pass.
        • An unlocked list: COUNTIF(K2:K4,C2) slides down to K3:K5 and starts rejecting web.
        • Testing the channel first in IFS, which changes the reason on row 26.
        • A highlight rule without $ before the columns: in Excel each cell of the row would test a different column, and the row lights up in patches.

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