How to Fix Excel Conditional Formatting Highlighting the Wrong Row
Question details
The user is attempting to highlight entire rows using an Excel conditional formatting formula, but the formatting is being applied to incorrect or offset rows instead of the expected target.

- Product
- Excel
- Device & OS
- not provided
- Scenario
- Applying a conditional formatting rule with a custom formula (e.g., =$H10="Completed") to highlight an entire row based on the text value of a specific cell within that row.
- Observed behavior
- The conditional formatting highlights a row different from the one containing the matching text value, or the rule completely fails to trigger due to syntax or range selection issues.
Before troubleshooting, review the exact range of cells you have selected for your formatting rule, as a mismatch between the selected range and the formula is the most common cause of offset highlighting.
Align the Selected Range with the Formula's Row Number
Fix offset row highlighting by ensuring the row number in your conditional formatting formula exactly matches the first row of your selected data range.
When applying a conditional formatting formula to an entire block of data, Excel evaluates the formula based on the active cell (usually the top-left cell of your selection). If your data range starts at row 2, but your formula is written as =$H10="Completed", Excel will apply an 8-row offset. This causes it to highlight a completely different row from the one containing your target word.
Highlight the exact block of cells you want the formatting to apply to, starting from the top data row (for example, A2:J100). Note the row number where your selection begins.
Navigate to the Home tab on the Excel ribbon, click on Conditional Formatting, and select Manage Rules from the dropdown menu.
Select the rule that is highlighting the wrong row and click Edit Rule.
Modify your formula so the row number matches the first row of your selection. If your selection started at row 2, change the formula to =$H2="Completed" and click OK.

Correct Absolute Column and Relative Row References
Ensure the formula uses the correct combination of absolute and relative references so that Excel checks the correct column but evaluates each row independently.
Replace Typographic or Smart Quotation Marks
Replace formatted quotation marks with standard straight quotes to ensure Excel properly recognizes your text criteria.
Highlight Rows Flawlessly with WPS Spreadsheet
Avoid frustrating formula offsets and formatting errors with WPS Spreadsheet. It features an intuitive Conditional Formatting manager, making it simple to highlight rows based on text criteria with full support for standard Excel formulas.
- 1. Open your workbook: Launch WPS Spreadsheet and open your existing spreadsheet document. Select the exact data range you wish to format.
- 2. Access Conditional Formatting: Navigate to the Home tab on the top ribbon, click on Conditional Formatting, and choose New Rule.
- 3. Enter your highlighting formula: Select 'Use a formula to determine which cells to format'. Enter your formula using the proper locked column reference (e.g., =$H2="Completed").
- 4. Apply styling and save: Click the Format button to choose your desired row highlight color, click OK to confirm, and instantly see the correct rows highlighted.

Frequently Asked Questions
Why does conditional formatting highlight the row below the matching value?
This happens when your selected range starts at one row (e.g., row 2), but your conditional formatting formula refers to the row above it (e.g., =$A1="Text"). Excel applies this one-row offset to the entire selection, resulting in the row below the match being highlighted.
Can I highlight a row based on multiple text conditions?
Yes. You can use the OR function or AND function within your conditional formatting formula. For example, the formula =OR($H2="Completed",$H2="In Progress") will highlight the entire row if either status condition is met.
Why is my conditional formatting rule completely ignored even when the formula is correct?
Your rule might be overridden by another formatting rule with a higher priority in the Rules Manager. Additionally, check the actual text inside your cells; if there are hidden leading or trailing spaces (e.g., "Completed " instead of "Completed"), the formula will not recognize it as a match.




