Solved

Ecxcel list - compare and select

Posted on 2016-11-06
4
55 Views
Last Modified: 2016-11-06
The attached file contains three columns.
Column A contains a full list of postcodes.
Column B contains a list that includes some of the postcodes that are listed in Column A.
The request is for a script or formula that will create a new column containing all postcodes that listed in Column A but not listed in Column B.
Column D is an example list containing the first few of these missing postcodes.
ee-example.xlsx
0
Comment
Question by:gregfthompson
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
4 Comments
 
LVL 51

Accepted Solution

by:
Rgonzo1971 earned 500 total points
ID: 41876131
Hi,

pls try

Sub macro()

For Each c In Range(Range("A2"), Range("A" & Rows.Count).End(xlUp))
    If Not Evaluate("=or(" & c & "=B:B)") Then
        Range("D" & Rows.Count).End(xlUp).Offset(1) = c.Value
    End If
Next
End Sub

Open in new window

Regards
0
 

Expert Comment

by:Viswanath V P
ID: 41876164
would like to share a manual way.
conditions:
postcodes within A column is unique or no repeats within the column
same goes for B column
Action:
Add filter to A and B
then Select whole A and B column together
Use conditional formatting, "Duplicates", change condition to Unique
sort out the highlighted on top
Copy them and paste in a different sheet
Remove the conditions from the second sheet
Excel-answer.docx
0
 

Author Closing Comment

by:gregfthompson
ID: 41876464
Thanks. Nice job.
0
 

Author Comment

by:gregfthompson
ID: 41876466
Thanks Viswanath VP.

I appreciate your suggestion. Rgonzo1971's script is easier as I have a number of files that have to be processed.

Thanks again,

Greg
1

Featured Post

Free Tool: ZipGrep

ZipGrep is a utility that can list and search zip (.war, .ear, .jar, etc) archives for text patterns, without the need to extract the archive's contents.

One of a set of tools we're offering as a way to say thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

This article will guide you to convert a grid from a picture into Excel format using Microsoft OneNote and no other 3rd party application.
Some code to ensure data integrity when using macros within Excel. Also included code that helps secure your data within an Excel workbook.
Although Jacob Bernoulli (1654-1705) has been credited as the creator of "Binomial Distribution Table", Gottfried Leibniz (1646-1716) did his dissertation on the subject in 1666; Leibniz you may recall is the co-inventor of "Calculus" and beat Isaac…
Finds all prime numbers in a range requested and places them in a public primes() array. I've demostrated a template size of 30 (2 * 3 * 5) but larger templates can be built such 210  (2 * 3 * 5 * 7) or 2310  (2 * 3 * 5 * 7 * 11). The larger templa…

734 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question