{"id":"sheet-off-countifs-open-orders","audience":"office","category":"spreadsheets","track":"data","technique":"context","title":"Get a formula that counts open supply orders, explained plainly","free":false,"task":"Your boss wants cell H2 on the Orders sheet to show how many Facilities orders are still open in rows 2-41, and at your office Backordered also counts as open. Ask for one formula in one code block, then exactly 2 numbered lines labeled Counts: and Skips: in plain words with no function names or cell references. Under 50 words outside the code.","materialLabel":"Your Orders sheet (attached to your prompt automatically)","material":"Sheet: Orders (rows 2-41 hold 40 orders, first rows shown)\n\nA Order ID | B Dept | C Item | D Qty | E Status | F Ordered on\nSO-301 | Facilities | Light bulbs (box) | 4 | Open | 2026-10-01\nSO-302 | Front Desk | Visitor badges | 200 | Delivered | 2026-10-01\nSO-303 | Facilities | Mop heads | 6 | Backordered | 2026-10-03\nSO-304 | IT | HDMI cables | 10 | Open | 2026-10-06\nSO-305 | Facilities | Trash bags (case) | 3 | Delivered | 2026-10-08\nSO-306 | Facilities | Door stops | 12 | Cancelled | 2026-10-09\nSO-307 | Kitchen | Coffee filters | 5 | Open | 2026-10-12\nSO-308 | Facilities | Paper towels (case) | 8 | Open | 2026-10-14\nSO-309 | IT | Mouse pads | 15 | Backordered | 2026-10-15\n...\n\nStatus values used: Open, Backordered, Delivered, Cancelled.\nCell H1 says \"Facilities still open\". H2 is empty.\nWe use Google Sheets.","rules":[{"type":"codeBlocks","count":1},{"type":"maxCodeLines","max":1},{"type":"maxProseWords","max":50}],"mistakes":[{"title":"Leaving out your office's rule","why":"The AI counts only \"Open\", so backordered mop heads vanish from the total.","fix":"Add: \"Backordered also counts as open.\"","checks":["r1"]},{"title":"Not naming the columns","why":"The AI guesses the layout or writes a formula for a made-up sheet.","fix":"Add: \"Dept is column B, Status is column E, rows 2-41.\"","checks":["r0"]},{"title":"Getting a jargon explanation","why":"The AI explains COUNTIFS argument by argument, which your boss won't read.","fix":"Add: \"Then 2 lines, Counts: and Skips:, in plain words, no function names.\"","checks":["r2","maxProseWords"]},{"title":"Getting a menu of options","why":"The AI likes to offer two or three versions of the formula, so you're left to pick and test them yourself.","fix":"Add: \"Give one formula only, in one code block, no alternatives.\"","checks":["codeBlocks","maxCodeLines"]}],"promptHints":[{"label":"States the Backordered rule","patterns":["backorder"]},{"label":"Names the columns and rows","patterns":["column [be]","b2:b41|e2:e41","rows 2"]},{"label":"Asks for one formula","patterns":["one formula","one code block","single formula","no alternatives"]},{"label":"Asks for a plain explanation","patterns":["plain","no function names","counts:","skips:"]}],"hint":"The AI doesn't know your office's rules or your sheet's layout. Say both, and ask for an explanation your boss can read.","rubricLabels":["The formula only counts rows where column B is Facilities, within rows 2-41 (or whole columns B and E)","The formula counts both Open and Backordered from column E (for example two COUNTIFS added together), not Open alone","After the code there are 2 numbered lines labeled Counts: and Skips:, with no function names or cell references, and Skips says Delivered and Cancelled orders aren't counted"]}