Formatting Issues

Highlight Excel Cells That Match Values in Another Column

Amos GikundaAmos Gikunda Dec 2, 2026 869 views

Question details

Highlight cells whose values appear in a specified lookup range in another column.

Highlight Excel Cells That Match Values in Another Column
Product
Microsoft Excel
Device & OS
not provided
Scenario
Compare values in column P with a lookup range in column T using conditional formatting.
Observed behavior
Cells in column P should be highlighted when their values match an entry in the specified range in column T.
Before you start

Identify the cells to highlight and the range containing the lookup values. This example checks P1:P100 against T10:T13; adjust both ranges to match your worksheet.

Solution 1Recommended

Create a formula-based conditional formatting rule in Excel

Use MATCH to check each selected cell against a fixed lookup range and highlight exact matches.

1
Select the cells to highlight

Select P1:P100 on the worksheet, starting with P1 as the active cell.

2
Create a new rule

Go to Home > Conditional Formatting > New Rule, then select Use a formula to determine which cells to format.

3
Enter the match formula

Enter =ISNUMBER(MATCH(P1,$T$10:$T$13,0)). Keep P1 relative so Excel checks each selected row, and keep the dollar signs around the lookup range so it stays fixed.

4
Choose the highlight

Select Format, choose a fill color, and click OK. Click OK again to apply the rule.

Create a formula-based conditional formatting rule in Excel
Adjust the starting reference: The formula must refer to the first cell in the selected range. For example, if the selection starts at P2, use P2 instead of P1.
Match values with conditional formatting

Highlight matching column values in WPS Spreadsheets

Use a formula-based conditional formatting rule in WPS Spreadsheets to highlight cells that appear in another column's lookup range.

  1. 1. Open the workbook: Open your spreadsheet in WPS Spreadsheets and select P1:P100.
  2. 2. Add a formatting rule: On the Home tab, choose Conditional Formatting > New Rule and select the option to use a formula.
  3. 3. Enter the formula: Enter =ISNUMBER(MATCH(P1,$T$10:$T$13,0)), adjusting the cell and lookup range for your worksheet.
  4. 4. Apply a fill color: Choose a fill color in the rule's formatting options, then confirm the dialogs to apply the rule.
Highlight matching values with a MATCH formula.Open and edit Microsoft Excel XLSX and XLS files.Choose a fill color to make matches easy to spot.Work with a familiar spreadsheet interface for free.
microsoft office alternative - wps office

Frequently Asked Questions

How do I highlight cells if the data starts in row 2?

Select the range starting at P2, such as P2:P100, and use =ISNUMBER(MATCH(P2,$T$10:$T$13,0)) in the conditional formatting rule.

How can I avoid highlighting blank cells?

Add a nonblank check to the formula: =AND(P1<>"",ISNUMBER(MATCH(P1,$T$10:$T$13,0))). Change P1 to the first cell in your selected range.

Does the MATCH formula distinguish uppercase and lowercase text?

No. MATCH with 0 looks for an exact value but is not case-sensitive for text.

How do I change the lookup range later?

In Excel, go to Home > Conditional Formatting > Manage Rules, select the rule, and choose Edit Rule. Update the fixed range in the formula, such as changing $T$10:$T$13 to $T$10:$T$20.