I have two columns of differing lengths filled with e-mail addresses. I need to compare Column-A to Column-B and output any addresses in Column-B that are not already present in Column-A.
In Column-C I used:
=IF(COUNTIF(B:B,A1),A1,0)
This outputs addresses that are in both to Column-C…the reverse of what I want.
I also tried:
=IF(ISERROR(MATCH(A1,$C$1:$C$5,0)),"",A1)
In that one the lists are in Column-A and Column-C and the results come in Column-B but it does not work for lists of differing lengths it seems.
The MATCH function worked fine for me. What issue were you having with lists of differing lengths?
If you are finding results in column A that don’t exist in column C, then copy the formula in column B for each row in column A. If the list length is dynamic, you can include another check to return blank if the cell in A is blank.
Copy it down for all cells in column B. This looks to see if the value of the Bx cell to its left is anywhere in column A. If it is, cell Cx is blank. If it is not, cell Cx has the value of cell Bx.
The thing with LOOKUP is that it will return the next highest value if it doesn’t find an exact value, so you have to test the return of the LOOKUP function against the original value to see if they match or not to know if you actually found what you were looking for or not.
To get just the results, of course, you’ll have to do a Copy, Paste Special (Values) to column D.
I may be oversimplifying what you need but all I would do is put in C1: “=B1=A1”
This will return TRUE if B1 and A1 are the same and FALSE if they differ.
Then just copy the formula all the way down and filter for FALSE
And for the really simple approach, if you have Excel 2007, put all the addresses in a single column and click the Remove Duplicates button on the Data ribbon.
I did that but that is a list composed of both lists. Turns out they only want the new ones on the second list (for various and unfortunately legitimate reasons).