Function Problems

Change an Entire Excel Row Color Based on a Drop-Down Selection

Steven ParkerSteven Parker Nov 25, 2026 870 views

Question details

The user wants to color an entire inventory row according to the location or status selected in a drop-down list.

Change an Entire Excel Row Color Based on a Drop-Down Selection
Product
Microsoft Excel
Device & OS
not provided
Scenario
An inventory table has a location or status column with drop-down selections, and each selection should give the corresponding row a specific fill color.
Observed behavior
Each inventory row should automatically display the color assigned to its selected location or status.
Before you start

Identify the drop-down column, the first data row, and the full table range you want to color. In the example below, locations are in column C, data starts in row 2, and the table range is A2:F100.

Solution 1Recommended

Create a Formula-Based Conditional Formatting Rule in Excel

Use this method to color each inventory row based on the value selected in its location drop-down.

The formula =$C2="Warehouse A" locks the reference to column C while allowing the row number to change for each row in the selected range.

1
Create the drop-down list

Enter the location options in a range of cells. Select C2:C100, then choose Data > Data Validation. Under Allow, select List, set Source to the range containing the options, and click OK.

2
Select the inventory range

Select A2:F100, excluding the headers. Make sure A2 is the active cell when you create the rule.

3
Add the formula rule

Go to Home > Conditional Formatting > New Rule. Choose Use a formula to determine which cells to format, and enter =$C2="Warehouse A".

4
Choose the row color

Click Format, open the Fill tab, select a color, and click OK. Click OK again to create the rule.

5
Add and test other locations

Create another rule for each location, changing the quoted text and fill color each time. Select a location from a cell in column C and confirm that the corresponding cells in columns A through F change color.

Create a Formula-Based Conditional Formatting Rule in Excel
Adjust the range and formula: Replace C with your drop-down column and 2 with the first row of your selected data range. The rule colors only the cells included in its Applies to range, which you can check under Home > Conditional Formatting > Manage Rules.
Work with inventory sheets in WPS

Color Inventory Rows by Drop-Down Selection in WPS Spreadsheet

Use data validation and a formula-based conditional formatting rule in WPS Spreadsheet to color inventory rows according to the selected location.

  1. 1. Open the inventory workbook: Open WPS Spreadsheet and use File > Open to select your inventory workbook.
  2. 2. Set up the drop-down: Enter your location options in cells, select C2:C100, and use Data > Data Validation to create a List from that range.
  3. 3. Select the rows to format: Select A2:F100, with A2 as the active cell. Adjust the range to match your inventory table.
  4. 4. Create the color rule: Choose Home > Conditional Formatting > New Rule, select the formula-based rule option, and enter =$C2="Warehouse A". Set a fill color and confirm the rule.
  5. 5. Add other colors: Create additional formula rules for the other drop-down values, then select locations in column C to test the row colors.
Color a full inventory row based on its location or statusCreate drop-down lists for consistent data entryOpen and save Microsoft Excel XLSX filesUse a familiar spreadsheet interface
microsoft office alternative - wps office

Frequently Asked Questions

Why does the formula use $C2 instead of $C$2?

$C2 keeps the rule pointed at column C while allowing the row number to change. Using $C$2 would make every formatted row depend on cell C2.

Why is only the drop-down cell changing color?

The rule may apply only to column C. In Excel, open Home > Conditional Formatting > Manage Rules and change Applies to so it covers the full data range, such as =$A$2:$F$100.

How do I assign different colors to different statuses?

Create a separate conditional formatting rule for each status. For example, use =$C2="In Stock" for one fill color and =$C2="Out of Stock" for another.

Will new inventory rows get the same formatting?

Only rows included in the rule's Applies to range are guaranteed to receive the formatting. If you add rows beyond that range, extend it under Home > Conditional Formatting > Manage Rules and extend the drop-down validation as needed.