Function Problems

Highlight Excel Rows When Values Match Another Column

Anum MushtaqAnum Mushtaq Nov 20, 2026 869 views

Question details

Highlight a cell or an entire row when its value appears in another column.

Highlight Excel Rows When Values Match Another Column
Product
Microsoft Excel
Device & OS
not provided
Scenario
Compare values in column D with values in column F and highlight matching rows or cells.
Observed behavior
Conditional formatting should highlight the row containing the matching value rather than an adjacent row.
Before you start

Identify the column to check, the column containing the comparison values, and the first row of the range you want to format. The examples below assume data starts in row 2 and runs through row 100.

Solution 1Recommended

Create a conditional formatting rule with MATCH

Use a formula-based rule to highlight each row where its column D value appears anywhere in column F.

1
Select the formatting range

Select A2:F100 to highlight entire rows, or select D2:D100 to highlight only the matching cells in column D.

2
Create a formula rule

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

3
Enter the comparison formula

Enter =ISNUMBER(MATCH($D2,$F$2:$F$100,0)). The $D2 reference checks column D in each row, while the fixed F range contains the values to match.

4
Choose the highlight

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

Create a conditional formatting rule with MATCH
Keep the starting row aligned: The row number in $D2 must match the first row of the selected formatting range. If the range starts at row 5, use $D5 instead. To highlight column F values found in column D, select F2:F100 and use =ISNUMBER(MATCH($F2,$D$2:$D$100,0)).
Highlight matching rows in WPS

Highlight matching rows in WPS Spreadsheet

Use a formula-based conditional formatting rule in WPS Spreadsheet to compare values in two columns and highlight matching rows.

  1. 1. Open your spreadsheet: Open WPS Spreadsheet and use File > Open to select your workbook.
  2. 2. Select the rows: Select A2:F100 to format the rows containing the values to compare.
  3. 3. Add a formula rule: Go to Home > Conditional Formatting > New Rule and choose the option to use a formula. Enter =ISNUMBER(MATCH($D2,$F$2:$F$100,0)).
  4. 4. Apply a format: Choose a fill color in the formatting settings and confirm the rule. Check that matches in column D highlight the intended rows.
Highlight rows based on values found in another columnWorks with Microsoft Excel XLSX and XLS filesUse familiar spreadsheet formulas and formatting controlsOpen and edit spreadsheets for free
microsoft office alternative - wps office

Frequently Asked Questions

Why is Excel highlighting the row next to the match?

The formula's starting row may not match the first row of the selected range. Under Home > Conditional Formatting > Manage Rules, check the Applies to range and make sure the formula uses $D2 if that range starts on row 2.

How do I highlight only the matching cells instead of whole rows?

Select D2:D100 before creating the rule, then use =ISNUMBER(MATCH($D2,$F$2:$F$100,0)) in the formula-based conditional formatting rule.

How can I highlight values in column F that also appear in column D?

Select F2:F100 and create a formula-based conditional formatting rule using =ISNUMBER(MATCH($F2,$D$2:$D$100,0)).

How do I prevent blank cells from being highlighted?

Add a nonblank test to the rule. For a range starting on row 2, use =AND($D2<>"",ISNUMBER(MATCH($D2,$F$2:$F$100,0))).