Tip: Other languages are Google-Translated. You can visit the English version of this link.
Log in
x
or
x
x
Register
x

or

How to highlight cells if not in another column in Excel?

In a worksheet, normally, you may need to compare two columns and highlight the cell values in a column which are not in another column to outstanding the results as following screenshot shown. And this article, I will talk about some good tricks to deal with this job.

doc highlight if not in list 1

Highlight cells if not in another column with Conditional Formatting

Highlight cells if not in another column with Kutools for Excel



In Excel, the Conditional Formatting feature can help you to highlight the different values between two columns, please do as follows:

1. Select cells in List A where you want to highlight the values not in List B. And then click Home > Conditional Formatting > New Rule, see screenshot:

doc highlight if not in list 2

2. In the popped out New Formatting Rule dialog box, select Use a formula to determine which cells to format under the Select a Rule Type section, and then enter this formula:=ISERROR(MATCH(A2,$C$2:$C$14,0)) into the Format values where this formula is true text box, see screenshot:

doc highlight if not in list 3

Note: In the above formula: A2 is the first cell of the column that you want to highlight the different values, C2:C14 is another column range you want to be compared with.

3. Then click Format button, in the popped out Format Cells dialog box, please select one color under the Fill tab, see screenshot:

doc highlight if not in list 4

4. And then click OK > OK to exit the dialogs, and all the values in List A but not in List B have been highlighted in List A at once, see screenshot:

doc highlight if not in list 5

Note: On the other side, if you want to highlight the different values in List B, you just need to select the List B and apply this formula =ISERROR(MATCH(C2,$A$2:$A$15,0)) into the Conditional Formatting function.


If you have Kutools for Excel, with its Select same & Different Cells utility, you can quickly highlight the different or same values from the two columns.

Kutools for Excel : with more than 300 handy Excel add-ins, free to try with no limitation in 60 days. 

After installing Kutools for Excel, please do as follows:

1. Click Kutools > Select > Select Same & Different Cells, see screenshot:

doc highlight if not in list 06

2. In the Select Same & Different Cells dialog box, please specify the following operations:

(1.) Select the two columns that you want to compare from the Find values in and According to boxes separately;

(2.) Select Each row under the Based on section;

(3.) Choose Different Values form the Find section;

(4.) Then choose a background color or font color that you want to highlight the values under the Processing of results.

doc highlight if not in list 07

3. And then click Ok button, and the values in List A but not in List B have been selected and highlighted at once, see screenshot:

doc highlight if not in list 08

Note: To highlight the different values in List B, you just need to switch the range references in the Find values in and According to in the dialog box.

Download and free trial Kutools for Excel Now !


Kutools for Excel: with more than 200 handy Excel add-ins, free to try with no limitation in 60 days. Download and free trial Now!


Related articles:

How to check / find if value exists in another column?

How to compare two columns and list differences in Excel?

How to compare two columns and highlight when found in another column?


Kutools for Excel Solves Most of Your Problems, and Increases Your Productivity by 80%

  • Reuse: Quickly insert complex formulas, charts and anything that you have used before; Encrypt Cells with password; Create Mailing List and send emails...
  • Super Formula Bar (easily edit multiple lines of text and formula); Reading Layout (easily read and edit large numbers of cells); Paste to Filtered Range...
  • Merge Cells/Rows/Columns without losing Data; Split Cells Content; Combine Duplicate Rows/Columns... Prevent Duplicate Cells; Compare Ranges...
  • Select Duplicate or Unique Rows; Select Blank Rows (all cells are empty); Super Find and Fuzzy Find in Many Workbooks; Random Select...
  • Exact Copy Multiple Cells without changing formula reference; Auto Create References to Multiple Sheets; Insert Bullets, Check Boxes and more...
  • Extract Text, Add Text, Remove by Position, Remove Space; Create and Print Paging Subtotals; Convert Between Cells Content and Comments...
  • Super Filter (save and apply filter schemes to other sheets); Advanced Sort by month/week/day, frequency and more; Special Filter by bold, italic...
  • Combine Workbooks and WorkSheets; Merge Tables based on key columns; Split Data into Multiple Sheets; Batch Convert xls, xlsx and PDF...
  • More than 300 powerful features. Supports Office/Excel 2007-2019 and 365. Supports all languages. Easy deploying in your enterprise or organization. Full features 30-day free trial.
kte tab 201905

Office Tab Brings Tabbed interface to Office, and Make Your Work Much Easier

  • Enable tabbed editing and reading in Word, Excel, PowerPoint, Publisher, Access, Visio and Project.
  • Open and create multiple documents in new tabs of the same window, rather than in new windows.
  • Increases your productivity by 50%, and reduces hundreds of mouse clicks for you every day!
officetab bottom
Say something here...
symbols left.
You are guest ( Sign Up? )
or post as a guest, but your post won't be published automatically.
Loading comment... The comment will be refreshed after 00:00.
  • To post as a guest, your comment is unpublished.
    Steve · 2 years ago
    Is it possible to have one of the ranges reference another sheet? Having a hard time pulling this off.
    • To post as a guest, your comment is unpublished.
      Donald · 2 years ago
      =ISERROR(MATCH(E2,MyValues,0))


      Just define your range with Name Manager and reference it in the above code. The range can exist on any sheet in workbook.



      Or if you like to just reference a range manually without a name then... Types is the name of the other sheet in the same workbook.

      =ISERROR(MATCH(E2,Types!A5:A51,0))


      Another approach could be ...

      =IF(COUNTIF(MyValues,E11)>0,"BINGO it Exists","Name NOT in List")


      Again I am using a named range here but you can substitute it with reference from another sheet as example from above.

      Thanks,
      Don
    • To post as a guest, your comment is unpublished.
      skyyang · 2 years ago
      Hi, Steve:
      Yes, with the Kutools for Excel's Select Same & Different Cells feature, you can quikly compare two ranges from two worksheets, you just need to seelct one range in a worksheet, and select another range in another worksheet. Please try it. Hope it can help you!
  • To post as a guest, your comment is unpublished.
    cbw · 2 years ago
    I made sure the columns were of the same format and tried again and it worked. Thanks.
  • To post as a guest, your comment is unpublished.
    cbw · 2 years ago
    The =iserror formula did not do anything for me. It just put an icon on the sheet. Nothing got highlighted and no error. Is there something else I was supposed to do? I'm running Excel 2013.