+ Reply to Thread
Results 1 to 4 of 4

compare two columns and delete unique from one

  1. #1
    Registered User
    Join Date
    01-16-2015
    Location
    St Louis
    MS-Off Ver
    10
    Posts
    9

    compare two columns and delete unique from one

    Ok,

    I have a table on sheet1 with lot numbers in coulmn A.
    This table changes via an external datasource.

    On sheet2, I have values in column A taken from the column A on sheet1, and in column B some comments on that specific lot.

    What I would like to do, is as the data on sheet1 is updated;

    compare column A on sheet1 with column A on sheet2 and delete any rows on sheet2 that contain a unique value in column A (meaning the vlaue is no longer valid in my external datasource.... and would no longer be present in column A on sheet1.

    I have seen a lot of macros for deleting duplicates, but really non that are working for this issue.

  2. #2
    Forum Guru sktneer's Avatar
    Join Date
    04-30-2011
    Location
    Kanpur, India
    MS-Off Ver
    Office 365
    Posts
    9,649

    Re: compare two columns and delete unique from one

    See if the following code helps...

    Option Explicit

    Please Login or Register  to view this content.
    Regards
    sktneer


    Treat people the way you want to be treated. Talk to people the way you want to be talked to.
    Respect is earned NOT given.

  3. #3
    Registered User
    Join Date
    03-09-2014
    Location
    Florida
    MS-Off Ver
    Excel 2013
    Posts
    14

    Re: compare two columns and delete unique from one

    sktneer,
    I'm not the one you posted this for, but it is exactly what I was looking for and it works perfect. So thank you from me, since the other person wouldn't thank you for your time.

  4. #4
    Forum Guru sktneer's Avatar
    Join Date
    04-30-2011
    Location
    Kanpur, India
    MS-Off Ver
    Office 365
    Posts
    9,649

    Re: compare two columns and delete unique from one

    @KK33317

    You're welcome. Glad you found it useful.

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. [SOLVED] Compare 2 columns and make a third with unique values
    By danedw in forum Excel Formulas & Functions
    Replies: 4
    Last Post: 02-11-2014, 11:14 PM
  2. How to compare two columns - one is non-unique
    By fishist in forum Excel General
    Replies: 4
    Last Post: 05-30-2013, 02:01 AM
  3. Compare two columns to determine unique data
    By typografx in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 02-22-2013, 09:05 PM
  4. Excel VBA Compare Columns and Remove Unique
    By sanjeevpandey in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 02-12-2013, 05:45 AM
  5. Compare 2 columns for unique values
    By Jim Gregg in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 02-10-2006, 12:40 PM

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1