Solved

Ecxcel list - compare and select

Posted on 2016-11-06
4
59 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 52

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

On Demand Webinar - Networking for the Cloud Era

This webinar discusses:
-Common barriers companies experience when moving to the cloud
-How SD-WAN changes the way we look at networks
-Best practices customers should employ moving forward with cloud migration
-What happens behind the scenes of SteelConnect’s one-click button

Question has a verified solution.

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

You need to know the location of the Office templates folder, so that when you create new templates, they are saved to that location, and thus are available for selection when creating new documents.  The steps to find the Templates folder path are …
This article describes how you can use Custom Document Properties to store settings and other information in your workbook so that they will be available the next time you open the workbook.
The viewer will learn how to use the =DISCRINV command to create a discrete random variable, use this command to model a set of probabilities and outcomes in a Monte Carlo simulation, and learn how to find the standard deviation of a set of probabil…
This Micro Tutorial will demonstrate how to use longer labels with horizontal bar charts instead of the vertical column chart.

622 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