Array Functions
Intermediate

Pull the items that need reordering off a warehouse count

FILTER hands back only the rows that pass a test — no manual scan, no separate list to keep in sync.

Task:

You manage inventory for a hardware store's warehouse. This morning's stock count is in front of you, and purchasing wants a reorder list — just the items that have dropped below 20 units on hand, with their quantities, so nobody has to scroll the full count to find them. In E2, use FILTER to list every item with fewer than 20 units, along with how many are left.

Learning Objectives:

  • Pull matching rows out of a table with FILTER, keeping every column together
  • Write a condition as a comparison across a whole range, not just one cell
  • See a two-column array spill down and to the right from a single formula
Hints

Solve without hints for +5 XP

Interactive Spreadsheet

The data in this exercise

This is the grid you start with. Cell references in the task — B6, C2 — point at the row numbers and column letters below.

ABCDEF
1ItemQuantityReorder itemQty on hand
2Packing tape42
3Bubble wrap26
4Shipping labels15
5Box cutters8
6Zip ties60
7Pallet wrap12
What this exercise teaches (contains the answer)

FILTER tests B2:B7<20 against every row and keeps only the ones where it's true, carrying along whichever columns of A2:B7 that row belongs to — which is why Shipping labels arrives paired with 15 rather than as a bare name. It's one formula rather than three separate ones for each qualifying item because the whole array moves as a unit: add a seventh item to the count tomorrow and the reorder list picks it up on its own, without the formula needing to be rewritten to reach a new row. The result spills down and across from E2 rather than needing three cells fixed in advance, since FILTER can't know how many rows will pass until it runs.