A stock alert is only useful if it also says how much to order. Writing “Restock” is a first step, but the buyer then needs a quantity. With a threshold stored in one cell and locked with the $ sign, IF calculates both the alert and the order, and a nested IF can even mark critical cases.
The following exercise shows you how to build a complete low-stock alert, from a logical test to a two-level nested IF.
What you will practice in this exercise
You work on an inventory with a stock threshold in cell B1. You answer 10 questions, one formula per question:
- Is the stock below the threshold? (logical test with $B$1)
- Display “Restock” when the stock is below the threshold (IF with a text result)
- Calculate the gap between the stock and the threshold (subtraction)
- Calculate the quantity to order, otherwise 0 (IF with a calculation)
- Order 50 if critical, 30 if below the threshold, otherwise 0 (nested IF)
- Fill each formula down the list (copy a formula)
Practice with exercises
IF — Stock management
Flag reorder points and low-stock alerts across a full inventory table with IF.
Related articles
All the exercises in this series are based on real cases found on Excel forums. Each one answers a question that Excel users really ask.