Formatting Issues

Highlight Values Outside Minimum and Maximum Limits in Excel

Natalie TaylorNatalie Taylor Dec 2, 2026 868 views

Question details

Highlight values in column D that fall below the corresponding minimum in column B or above the maximum in column C.

Highlight Values Outside Minimum and Maximum Limits in Excel
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.
Before you start

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.

Solution 1Recommended

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.

1
Select the target range

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.

2
Create a formula rule

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.

3
Enter the comparison formula

Enter =OR($D3<$B3,$D3>$C3). The dollar signs lock the columns, while the row references adjust for each row in the selected range.

4
Choose the highlight

Select Format, choose a fill color, and confirm the format and the new rule with OK.

Create a Formula-Based Conditional Formatting Rule in Excel
Check the range and blank cells: The formula must refer to the first row of the selected range. Values equal to either limit are not highlighted. Blank cells may be treated as zero; if all three cells must contain numbers, use =AND(ISNUMBER($B3),ISNUMBER($C3),ISNUMBER($D3),OR($D3<$B3,$D3>$C3)) instead.
WPS Spreadsheets

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. 1. Open your spreadsheet: Open WPS Spreadsheets and use Open to select your workbook.
  2. 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. 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. 4. Set the formula and format: Enter =OR($D3<$B3,$D3>$C3), choose a fill color under Format, and confirm the rule.
Highlight values outside row-specific limitsOpen and edit Microsoft Excel XLSX filesApply one formula across a selected rangeUse a familiar spreadsheet interface
microsoft office alternative - wps office

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.