MS Excel: Subtract one list from another?

clickynext

Platinum Member
Dec 24, 2004
2,583
0
0
Hi,

I have two lists of names, let's call them A and B. Each list is a single column of values. A has all the names that B has, and some more. I want to take all the names that are in B out of A, so that A only ends up with names which are not in B. Anyone know how to do that? Thanks.
 

PowerEngineer

Diamond Member
Oct 22, 2001
3,583
756
136
Set up a column C with the formula:

=IF(ISBLANK(A1), IF(ISNA(MATCH(A1,B$1:B$??,0),A1,""), "")

Replace ?? with in the number of names in column B, and copy this formula down column C for at least as many rows as are names in column A.

If you want the names in column C grouped together, do a sort on columns A through C using column C as the first key.

Good luck!