Formatting Issues

How to Use Conditional Formatting to Highlight In-Stock Parts in Excel

John WilsonJohn Wilson Nov 10, 2026 869 views

Question details

Highlight specific parts on a repair sheet if their corresponding quantity in an inventory list is greater than zero.

How to Use Conditional Formatting to Highlight In-Stock Parts
Product
Excel / WPS Spreadsheet
Device & OS
not provided
Scenario
Tracking inventory levels on a repair sheet and needing visual indicators for parts that are currently available in stock.
Observed behavior
Cells containing part names on the repair sheet are automatically filled with a highlight color when the matching part in the inventory table has a quantity greater than zero.
Before you start

Ensure your inventory list and repair sheets are correctly formatted as tables or have defined ranges so your lookup formulas can reference them accurately without errors.

Solution 1Recommended

Apply Conditional Formatting using a SUMIFS Formula

Best for straightforward lists where the part name is isolated in its own cell on the repair sheet.

Using the SUMIFS function within a conditional formatting rule allows you to cross-reference the part name in your current cell with an external inventory table and sum its quantity. If the quantity exceeds zero, the formatting is triggered.

1
Select the target range

Highlight the range of cells containing the part names on your repair sheet (for example, A2:A100).

2
Open Conditional Formatting

Navigate to the 'Home' tab on the top ribbon, click 'Conditional Formatting', and select 'New Rule'.

3
Enter the custom formula

Choose 'Use a formula to determine which cells to format'. In the formula box, enter `=SUMIFS(Inventory[Quantity], Inventory[Part], A2)>0`, adapting the table names and starting cell reference to match your actual data.

4
Set the highlight format

Click the 'Format' button, go to the 'Fill' tab, choose a highlight color (such as green), and click 'OK' twice to apply the rule.

Apply Conditional Formatting using a SUMIFS Formula
Using Named Ranges: If you are not using formatted tables, use absolute references like $B$2:$B$100 for your inventory data to ensure the formula does not shift.
Smart Data Formatting

Use WPS Spreadsheet for Advanced Inventory Highlighting

WPS Spreadsheet provides robust conditional formatting and advanced formula support to handle complex inventory tracking and repair sheets seamlessly.

  1. 1. Open your inventory workbook: Launch WPS Spreadsheet and open the document containing your repair sheet and inventory data.
  2. 2. Access Conditional Formatting: Highlight your target column and click 'Conditional Formatting' under the 'Home' tab.
  3. 3. Apply your formula rule: Select 'New Rule', input your custom SUMIFS or text extraction formula, set the highlight color, and click 'OK'.
Fully compatible with Microsoft Excel conditional formatting rules and formulas.Supports advanced functions like SUMIFS, TEXTAFTER, and SUBSTITUTE to cross-reference data arrays.Free, lightweight, and delivers fast performance even with large inventory datasets.
QA img-9

Frequently Asked Questions

Why isn't my conditional formatting formula working across different sheets?

Ensure you are using absolute references (like $A$1:$B$50) or named ranges (like Inventory[Quantity]) when referring to data on a different worksheet, so the reference doesn't shift as the rule applies down the column.

How can I extract part names if my version doesn't support the TEXTAFTER function?

If TEXTAFTER is not supported, you can use the formula `=TRIM(MID(A2, FIND(":", A2) + 1, LEN(A2)))` to extract the part name immediately following a colon.

Can I highlight the entire row instead of just the cell with the part name?

Yes. Select your entire data range before creating the conditional formatting rule, and lock the column reference for the part name cell in your formula (for example, use $A2 instead of A2).