Solved

Ecxcel list - compare and select

Posted on 2016-11-06
4
29 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
  • 2
4 Comments
 
LVL 48

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

What Should I Do With This Threat Intelligence?

Are you wondering if you actually need threat intelligence? The answer is yes. We explain the basics for creating useful threat intelligence.

Join & Write a Comment

Introduction While answering a recent question (http:/Q_27311462.html), I created an alternative function to the Excel Concatenate() function that you might find useful.  I tested several solutions and share the results in this article as well as t…
Improved? Move/Copy Add-in Replacement - How to avoid the annoying, “A formula or sheet you want to move or copy contains the name XXX, which already exists on the destination worksheet.” David Miller (dlmille)  It was one of those days… I wa…
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 create pivot charts out of a data set. I also added a drop-down menu which allows to choose from different categories in the data set and the chart will automatically update.

707 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

Need Help in Real-Time?

Connect with top rated Experts

12 Experts available now in Live!

Get 1:1 Help Now