I have two columns in excel, and I want to find (preferably highlight) the items that are in column B, but not in column A.

What's the quickest way to do this?

link|improve this question

67% accept rate
feedback

3 Answers

up vote 5 down vote accepted
  1. Select the list in column A
  2. Right-Click and select Name a Range...
  3. Enter "ColumnToSearch"
  4. Click cell C1
  5. Enter this formula: =MATCH(B1,ColumnToSearch,0)
  6. Drag the formula down for all items in B

If the formula fails to find a match, it will be marked #N/A, otherwise it will be a number.

If you'd like it to be TRUE for match and FALSE for no match, use this formula instead:

=IF(ISNA(MATCH(B1,ColumnToSearch,0)),FALSE,TRUE)
link|improve this answer
3  
Then... Put this formula into Conditional Formatting in both lists and and use it to highlight (or whatever) the non-matching cells – Kije Dec 10 '09 at 19:55
feedback

Here's a quick-and-dirty method.

Highlight Column B and open Conditional Formatting.

Pick Use a formula to determine which cells to highlight.

Enter the following formula then set your preferred format.

=countif(A:A,B1)=0

link|improve this answer
feedback

See my array formula answer to listing A not found in B here:

=IFERROR(INDEX($A$2:$A$1999,MATCH(0,IFERROR(MATCH($A$2:$A$1999,$B$2:$B$399,0),COUNTIF($C$1:$C1,$A$2:$A$1999)),0)),"")

Comparing two columns of names and returning missing names

link|improve this answer
feedback

Your Answer

 
or
required, but never shown

Not the answer you're looking for? Browse other questions tagged or ask your own question.