ExcelUnpackUnpack Excel, one formula at a time.
Log inSign up

Lesson 82 · Combined projects

Project: Store inventory in Excel

This project runs a small store inventory: flag items to reorder, look up an item by its code, and count and add up the stock that needs reordering.

Practice this lesson →Pro lesson. The first 4 lessons are free.

What you will learn

  • Use IF, XLOOKUP, COUNTIF, SUM and SUMIF together

How it works

Flag the items that need reordering. Then look up an item by its code and count the items that need reordering.

Note: this project uses XLOOKUP. It works in Excel 2021 and newer, and in Microsoft 365. In older Excel, use VLOOKUP instead.

Formulas at a glance

=IF(C2<=D2,"Reorder","OK")The pattern to follow
=XLOOKUP(H2,A2:A8,B2:B8,"Not found")The pattern to follow

Example

Write the formula to show "Reorder" if Pencils In stock is at or below Reorder at. Otherwise "OK".

ABCDEFGH
1CodeItemIn stockReorder atStatus
2S-01Pencils4025Find codeS-05
3S-02Erasers1215Item
4S-03Glue810In stock
5S-04Rulers3010To reorder
6S-05Paper520
7S-06Tape1815Total stock
8S-07Markers912Stock to reorder

Click E2 and type =IF(C2<=D2,"Reorder","OK"), then press Enter.

The answer is OK.

When to use it

  • Stock lists for a shop or stock room
  • Reorder reports
  • Practicing IF, lookups, COUNTIF and SUMIF together

Common mistakes

  • Using < when it should be <=At or below the reorder level means <=.
  • XLOOKUP showing #NAME?Use VLOOKUP in Excel older than 2021.
  • Not locking rangesLock ranges with $ when you copy formulas.

Practice it on a real sheet

Reading is a start. Doing it is how it sticks. This lesson walks you through every click on a live spreadsheet and checks each answer.

Project: Store inventory in Excel: how it works, with examples · ExcelUnpack