Module 05: Turn data into decisions
Highlight rows with a rule you can explain
Flag low stock with a mixed-reference formula while distinguishing missing quantities from genuine zero stock.
Windows desktop Excel 2016, 2019, 2021, 2024 and Microsoft 365. Mac and Excel for the web support conditional formatting, but rule-creation dialogs differ; the web uses a Formula rule in its formatting pane.
Useful first: Copy formulas while keeping shared inputs fixed · Turn clear rules into IF, AND, and OR formulas
- Apply one row-based formula across a multi-column range.
- Understand why a column is locked while the row changes.
- Keep missing input distinguishable from a valid zero.
Small data. A result you can check.
Synthetic data. Keep the empty Stock cell for P04 genuinely empty; do not replace it with zero or a space.
View the raw practice data
SKU Item Stock Minimum P01 Pen 4 10 P02 Pad 12 10 P03 Clip 0 5 P04 Box 3 P05 Tape 5 5
01Define the exception before selecting a color
Paste the sample into A1:D6 on a sheet named Stock. Reorder means a numeric Stock value strictly below a numeric Minimum. Zero is valid stock; the empty Stock cell for P04 means unreported. Equality is sufficient stock in this exercise, so P05 must not be flagged.
Add Status in E1 and enter the helper formula below in E2, then fill down to E6. The expected statuses are Reorder, Enough, Reorder, Check input and Enough. A readable status makes the rule auditable and useful without relying on color.
=IF(AND(ISNUMBER(C2),ISNUMBER(D2)),IF(C2<D2,"Reorder","Enough"),"Check input")English function names and commas are shown. Use semicolons between arguments if required by your Excel locale.
02Anchor the rule to the first selected row
Select A2:D6 with A2 as the active cell. On Windows choose Home > Conditional Formatting > New Rule > Use a formula to determine which cells to format. Enter the rule below, choose a noticeable fill and confirm. In Manage Rules, verify Applies to is =$A$2:$D$6.
The dollar signs lock columns C and D because every cell in a highlighted row must examine that row's stock and minimum. The row number stays relative: row 3 examines C3 and D3. Writing $C$2 and $D$2 would make every row depend on P01 instead.
=AND(ISNUMBER($C2),ISNUMBER($D2),$C2<$D2)Expected highlighted ranges: A2:D2 and A4:D4 only. The blank C5 must not be treated as an instruction to reorder.
03Test boundaries and diagnose surprises
Confirm the three boundary cases separately: P03 has zero stock and is below five; P04 has unknown stock; P05 has five against a minimum of five. A rule containing only C2<D2 can make a blank quantity look like zero, so the numeric checks matter.
Conditional formatting changes appearance, not the underlying data or total. If a row has the wrong appearance, inspect its status, actual stored values, formula, applied range and other rules. A number stored as text is intentionally Check input here; repair its type rather than loosening the rule. Actual worksheet errors also need diagnosis, not a claim that an uncolored row is correct.
After adding more products, extend both the helper formulas and the rule's applied range. Do not assume a fixed A2:D6 range will cover a newly appended seventh row.
Record two new stock counts and predict the resulting flags.
- Change C3, the stock for P02, from 12 to 8.
- Enter 1 in previously empty C5 for P04.
- Check the helper statuses and the full highlighted row ranges.
Show the worked answer
P01, P02, P03 and P04 now show Reorder. Rows 2, 3, 4 and 5 are highlighted across A:D.
P05 remains Enough because 5 is not below 5. No source record has been deleted or filtered.
Check your work- Before the changes there are two reorder rows and one missing-input row.
- After the changes there are four reorder rows and no missing-input row.
One question before you move on.
Ready for the next step?
Mark this lesson when you can explain the idea and reproduce the practice result.
Your checklist stays on this browser.Reference notes
These lessons use original examples. Check Microsoft’s documentation for details and platform-specific options.
- Microsoft: Use conditional formatting to highlight information
- Microsoft: Switch between relative, absolute, and mixed references
Prepared September 13, 2026 · Column Harbor editorial team. Menu locations and available functions can vary by Excel version.