How to Highlight Excel Cells Based on a Row Value
Question details
The user needs to highlight specific cells that contain text, based on a corresponding criteria value located in a different column of the exact same row, without highlighting the entire row.

- Product
- Excel
- Device & OS
- not provided
- Scenario
- Creating a schedule or tracking sheet where specific task or status cells require color-coding depending on the person assigned to that row.
- Observed behavior
- Needs to apply advanced conditional formatting rules using logical formulas to target individual cells across a schedule range dynamically.
Ensure you have clearly identified the reference column containing the condition (e.g., the assigned names) and the target cell range you want to be highlighted.
Use the AND Formula in Conditional Formatting
Apply a custom formula rule to highlight cells that are not empty and simultaneously match a specific value in a designated criteria column.
By utilizing the AND function within Conditional Formatting, you can set multiple requirements. This ensures the target cell will only be highlighted if it contains text and the reference column in the same row matches your specified criteria.
Highlight the specific range of cells where the formatting should appear (e.g., your entire schedule grid, excluding the headers).
Navigate to the 'Home' tab on the ribbon, click on 'Conditional Formatting', and select 'New Rule' from the dropdown menu.
In the dialog box, click on the option that says 'Use a formula to determine which cells to format'.
Type the formula =AND(EU6<>"",$B6="NISOG"). Replace 'EU6' with the first cell of your selected target range and '$B6' with your criteria column. The dollar sign ($) before the B is crucial as it locks the column reference.
Click the 'Format' button, navigate to the 'Fill' tab, choose your desired color (like light pink), and click 'OK' twice to apply the rule.

Highlight Cells Based on Conditions Using WPS Spreadsheet
WPS Spreadsheet offers powerful and intuitive conditional formatting features, making it incredibly easy to color-code your schedules and track data based on custom logical formulas.
- 1. Highlight data range: Open your document in WPS Spreadsheet and select the target cells you want to color-code.
- 2. Create a new rule: Navigate to the 'Home' tab, click 'Conditional Formatting', and choose 'New Rule'.
- 3. Apply formula and color: Select 'Use a formula to format cells', input your =AND() formula, pick a fill color from the format options, and click 'OK'.

Frequently Asked Questions
Why is my conditional formatting highlighting the wrong rows or cells?
This usually occurs due to incorrect relative and absolute cell referencing. Ensure your reference column has a dollar sign before the letter (e.g., $B6) to lock the column, while leaving the row number relative so it adjusts down the list.
Can I format the entire row instead of just the single cell?
Yes. To highlight the entire row, select your entire data table as the target range and use a single condition formula like =$B6="NISOG" without including the second condition that checks the individual cell's content.
How do I clear or delete conditional formatting rules?
Select the cells you want to modify, go to the 'Home' tab, click 'Conditional Formatting', hover over 'Clear Rules', and choose either 'Clear Rules from Selected Cells' or 'Clear Rules from Entire Sheet'.




