+ Reply to Thread
Results 1 to 8 of 8

Copy unique valiues from 2 tables

  1. #1
    Forum Contributor
    Join Date
    02-13-2017
    Location
    Belgium
    MS-Off Ver
    O365
    Posts
    102

    Copy unique valiues from 2 tables

    Hi All,

    I'm looking for a macro that searches unique values in two tables and copies those values to another table.
    If I add values to one of both tables, only the new unique values are copied.
    Example and more detailed info attached.
    Thanks!

    I've first tried it manually:
    Copy and paste both tables to new worksheet below each other.
    Remove duplicates and then copy these unique values to another table.
    DISADVANTAGE: every time I run the macro, All values needs to be re-calculated every time the macro is run.
    I'm talking about >20 000 values.

    If you would like more info, please let me know.
    Attached Files Attached Files
    Last edited by jonas-martens; 11-19-2018 at 03:24 AM.

  2. #2
    Valued Forum Contributor
    Join Date
    02-02-2016
    Location
    Indonesia
    MS-Off Ver
    Office 365
    Posts
    995

    Re: Copy unique valiues from 2 tables

    Quote Originally Posted by jonas-martens View Post
    Hi All,

    I'm looking for a macro that searches unique values in two tables and copies those values to another table.
    If I add values to one of both tables, only the new unique values are copied.
    Example and more detailed info attached.
    Thanks!
    Try this:

    Please Login or Register  to view this content.

  3. #3
    Forum Contributor
    Join Date
    02-13-2017
    Location
    Belgium
    MS-Off Ver
    O365
    Posts
    102

    Re: Copy unique valiues from 2 tables

    Hi Akuini,

    Thanks for your reply.
    Macro seems to head in the right direction, but I miss one thing.

    If I add new values to the table in Sheet Data2, then the macro doesn't work.
    Maybe this was not clear at first, sorry for this.

    So If I add new values to Data1 OR Data2.
    Unnique values are copied to worksheet calculate.

    thx

  4. #4
    Forum Guru
    Join Date
    08-15-2004
    Location
    Tokyo, Japan
    MS-Off Ver
    2013 O.365
    Posts
    22,464

    Re: Copy unique valiues from 2 tables

    Paste this to Calculate sheet code module.
    Please Login or Register  to view this content.

  5. #5
    Forum Contributor
    Join Date
    02-13-2017
    Location
    Belgium
    MS-Off Ver
    O365
    Posts
    102

    Re: Copy unique valiues from 2 tables

    GREAT!
    Thanks Jindon!

    But can you link this macro that it works if I push a button?

  6. #6
    Forum Guru
    Join Date
    08-15-2004
    Location
    Tokyo, Japan
    MS-Off Ver
    2013 O.365
    Posts
    22,464

    Re: Copy unique valiues from 2 tables

    You are welcome and thanks for the rep.

  7. #7
    Forum Guru
    Join Date
    08-15-2004
    Location
    Tokyo, Japan
    MS-Off Ver
    2013 O.365
    Posts
    22,464

    Re: Copy unique valiues from 2 tables

    Re your PM.

    Remember no one can ask any question via PM under forum rule.

    If you want to change it to assign to a button then
    Please Login or Register  to view this content.

  8. #8
    Forum Contributor
    Join Date
    02-13-2017
    Location
    Belgium
    MS-Off Ver
    O365
    Posts
    102

    Re: Copy unique valiues from 2 tables

    Sorry, didn't know that.

    Thanks a 100000x Jindon!

+ 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. Pivot Tables with unique nested fields
    By mfraile in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 12-02-2013, 05:05 AM
  2. Assigning unique names to cells in tables
    By Righy.d in forum Excel General
    Replies: 2
    Last Post: 07-12-2012, 09:16 AM
  3. [SOLVED] Duplicate Pivot Tables vs. Unique Pivot Tables
    By keithfender in forum Excel General
    Replies: 3
    Last Post: 07-11-2012, 10:35 AM
  4. Track unique changes in two tables/ranges.
    By adamwestrop in forum Excel General
    Replies: 3
    Last Post: 08-18-2011, 05:59 AM
  5. Unique values in Pivot tables
    By ekat in forum Excel General
    Replies: 15
    Last Post: 10-26-2010, 12:16 PM
  6. Merge two tables / unique values
    By ElmerS in forum Excel General
    Replies: 2
    Last Post: 07-14-2010, 11:32 AM
  7. tables with unique addresses
    By MC299 in forum Excel General
    Replies: 2
    Last Post: 08-29-2006, 03:49 AM
  8. Match two tables using unique ID number
    By fisherman in forum Excel General
    Replies: 1
    Last Post: 08-17-2005, 10:04 PM

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