Highlight Values Outside Minimum and Maximum Limits in Excel
Question details
Highlight values in column D that fall below the corresponding minimum in column B or above the maximum in column C.

- Product
- Microsoft Excel
- Device & OS
- not provided
- Scenario
- Apply one conditional formatting rule to column D, starting in row 3, using the limits on each corresponding row.
- Observed behavior
- Values outside their row's minimum and maximum limits should be highlighted across the selected range.
Check that column B contains the minimum, column C contains the maximum, and column D contains the value to test. The steps assume your first data row is row 3; adjust the formula's row number if your data starts elsewhere.
Create a Formula-Based Conditional Formatting Rule in Excel
Use one rule with relative row references to compare each value in column D with its own row's limits.
Click the Name Box to the left of the formula bar, enter D3:D1048576, and press Enter to select column D from row 3 to the last Excel row. For better performance, you can select only the rows you need, such as D3:D1000.
On the Home tab, select Conditional Formatting > New Rule, then choose Use a formula to determine which cells to format. If a Style box appears, select Classic first.
Enter =OR($D3<$B3,$D3>$C3). The dollar signs lock the columns, while the row references adjust for each row in the selected range.
Select Format, choose a fill color, and confirm the format and the new rule with OK.

Highlight Out-of-Range Values in WPS Spreadsheets
Use a formula-based conditional formatting rule in WPS Spreadsheets to compare each value with the minimum and maximum on the same row.
- 1. Open your spreadsheet: Open WPS Spreadsheets and use Open to select your workbook.
- 2. Select column D: Select the cells to check, starting at D3, such as D3:D1000. Extend the selection to cover the rows you need.
- 3. Add the rule: Go to Home > Conditional Formatting > New Rule and choose the option to use a formula to determine which cells to format.
- 4. Set the formula and format: Enter =OR($D3<$B3,$D3>$C3), choose a fill color under Format, and confirm the rule.

Frequently Asked Questions
Why does the formula use dollar signs before the column letters?
In =OR($D3<$B3,$D3>$C3), the dollar signs keep the references in columns D, B, and C. The row numbers remain relative so each selected row is compared with its own limits.
Will values equal to the minimum or maximum be highlighted?
No. The < and > operators highlight only values strictly outside the limits. Use <= and >= if values equal to either limit should also be highlighted.
How can I prevent blank cells from being highlighted?
In the conditional formatting rule, use =AND(ISNUMBER($B3),ISNUMBER($C3),ISNUMBER($D3),OR($D3<$B3,$D3>$C3)). This checks that all three cells contain numbers before testing the limits.
How do I change the rows covered by the rule?
In Excel, go to Home > Conditional Formatting > Manage Rules and edit the Applies to range. Keep the formula's row number aligned with the first row of the range.




