How to Format an Entire Excel Row from a Yes or No Dropdown
Question details
The user wants an entire worksheet row to automatically change its background and font color (e.g., turn green) when a specific cell in that row containing a dropdown menu is set to 'Yes'.

- Product
- Excel
- Device & OS
- not provided
- Scenario
- Tracking task completion statuses where selecting 'Yes' in a dropdown should visually highlight the entire corresponding row for better data readability.
- Observed behavior
- The user needs a method to apply a formatting rule across multiple rows without having to manually adjust the cell references or re-enter the formula for each individual row.
Ensure you have already set up your Data Validation dropdown lists containing the 'Yes' or 'No' options in a specific column (for example, Column M) before applying the formatting rule.
Apply Conditional Formatting Using a Custom Formula
Create a conditional formatting rule using a mixed cell reference (locking the column but not the row) so Excel automatically applies the correct highlighting to each row.
By using a mixed reference like =$M2, you are telling Excel to always look at Column M, but allow the row number to adjust dynamically as it evaluates each row in your selected range.
Highlight all the rows and columns you want to format. For example, select A2 through Z100. Always start your selection from the top-left cell of your data.
Navigate to the Home tab on the Excel ribbon, click on 'Conditional Formatting', and select 'New Rule' from the dropdown menu.
Choose the option 'Use a formula to determine which cells to format'. In the formula box, enter =$M2="Yes" (replace 'M' with your actual dropdown column letter and '2' with your starting row).
Click the 'Format' button. Go to the 'Fill' tab to choose a light green background color, and to the 'Font' tab to select a dark green text color. Click OK to save and apply the rule.

Copy the Formatting Rule Using Format Painter
If you have already successfully formatted the first row, you can quickly duplicate this conditional formatting to subsequent rows using the Format Painter tool.
Highlight Rows Effortlessly in WPS Spreadsheet
WPS Office provides a highly intuitive and powerful Spreadsheet application that fully supports advanced conditional formatting formulas, making it incredibly simple to automate your row highlighting.
- 1. Select Data Range: Open your file in WPS Spreadsheet and highlight the data range (e.g., A2:M100).
- 2. Access Conditional Formatting: Go to the Home tab on the top ribbon and click 'Conditional Formatting', then select 'New Rule'.
- 3. Input the Custom Formula: Select 'Use a formula to determine which cells to format', and type your formula (e.g., =$M2="Yes").
- 4. Customize and Apply: Click 'Format' to choose your desired row highlight color, click OK, and watch your rows update automatically based on dropdown selections.

Frequently Asked Questions
Why is the conditional formatting highlighting the wrong row?
This happens when the row number in your formula does not match the first row of your selected range. If you selected A2:Z100, your formula must reference row 2 (e.g., =$M2="Yes"). If it references =$M3, the formatting will be offset by one row.
Can I format the row differently if the dropdown says 'No'?
Yes, you can stack rules. Simply go to Conditional Formatting > New Rule again, choose 'Use a formula', and enter =$M2="No". Then, set a different format, such as a red fill color. Both rules will operate independently.
How do I ensure the rule applies automatically when I add new rows?
The easiest way is to format your data range as an Official Excel Table (Insert > Table). When you add a new row to the bottom of a Table, it automatically inherits all existing data validation dropdowns and conditional formatting rules.




