Comparing and extracting from two columns

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

Hi all,

I have two columns of data. Column A is a list of approx. 20,000 ZIP codes, column B is a selected list of approx. 1600 ZIP codes. How can I compare the two and remove all of the entries in A except those that match B. I would also like to have A sorted so that the identical entries line up with B. There may be entries in B that are not in A, so I would like A to contain a blank cell where the match would be.

I used =IF(VLOOKUP(B1,A:A,1,FALSE),"MATCH","") to highlight the matching ZIP codes in A, but that does not remove the unwanted ZIP codes or sort them to match across the rows. Any idea?
 
Back
Top