+ Reply to Thread
Results 1 to 6 of 6

How to check if a unique ID exists in another sheet,and if not, bring record to new sheet

  1. #1
    Registered User
    Join Date
    06-11-2014
    Posts
    15

    How to check if a unique ID exists in another sheet,and if not, bring record to new sheet

    Essentially, I'm trying to merge info from one spreadsheet into another. The Destination sheet has some of the records (with matching unique IDs) form the Source, but not all. I'd like to check if the Unique ID exists in the Destination array, and if not, bring parts of the record from the Source to the Destination sheet. My first thought was to create a third sheet, where I'd test whether there's a match, and if not, display the cell there, but I ran into some circular referencing issues. Essentially, I'm updating one sheet (destination) with data/records from another (source) - I've figured out how to update records with matching IDs, thanks to the help of this forum, but am stuck bringing in those records who's IDs do not yet exist in the destinationVLOOKUP_Test_Book.xlsx
    Thanks for any help!

  2. #2
    Valued Forum Contributor nigelbloomy's Avatar
    Join Date
    11-06-2013
    Location
    USA
    MS-Off Ver
    Excel 2010
    Posts
    1,011

    Re: How to check if a unique ID exists in another sheet,and if not, bring record to new sh

    I created a new column in the source sheet and put in the following formula:
    Please Login or Register  to view this content.
    Employee ID's that exist in the source sheet but not in the destination list are shown as "New" and the ones with a match already are shown as "Exists". Does that help?
    Some people volunteer in soup kitchens or hospitals. I choose to make the world better by trying to help you with Excel. We're all learning.

    <---Click * Add Reputation for all helpful comments. It's like giving a smile.
    Forum Rules: How to mark your post [Solved] and have a happier, Excel enriched life.

  3. #3
    Registered User
    Join Date
    06-11-2014
    Posts
    15

    Re: How to check if a unique ID exists in another sheet,and if not, bring record to new sh

    This does help, as it lets me know which records exist (and therefore won't be copied to the destination) and which are new (and therefore will be copied to the destination) but now I'm just not sure how to best transfer the New data to the destination. I guess I can filter out the Exists records, then simply copy and paste the data I want, but I'm guessing there's a better way to do so with functions.

    Thank you for your help though!

  4. #4
    Valued Forum Contributor nigelbloomy's Avatar
    Join Date
    11-06-2013
    Location
    USA
    MS-Off Ver
    Excel 2010
    Posts
    1,011

    Re: How to check if a unique ID exists in another sheet,and if not, bring record to new sh

    I believe VBA is the only way to fully automate what you are looking for. This code works if you add in a DOB column B in your sourceSheet. That way the fields all line up when they are copied and pasted to the destination sheet.

    Please Login or Register  to view this content.

  5. #5
    Registered User
    Join Date
    06-11-2014
    Posts
    15

    Re: How to check if a unique ID exists in another sheet,and if not, bring record to new sh

    Cool, I'll try this out and see if I can get it to work with my project. Thank you for helping out

  6. #6
    Forum Expert newdoverman's Avatar
    Join Date
    02-07-2013
    Location
    Port Dover, Ontario, Canada
    MS-Off Ver
    2010
    Posts
    10,330

    Re: How to check if a unique ID exists in another sheet,and if not, bring record to new sh

    I have combined both worksheets into one taking the missing values from the Source worksheet and combining them with the values in the Destination worksheet.

    There is a helper column (A) on both of your existing worksheets that has consecutive numbering for the values to be brought forward to the Combination worksheet.
    Attached Files Attached Files
    <---------If you like someone's answer, click the star to the left of one of their posts to give them a reputation point for that answer.
    Ron W

+ 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] How to check if a name in one sheet exists in other sheet.
    By sktneer in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 09-28-2013, 02:08 AM
  2. [SOLVED] Check to see if sheet exists
    By jet2004uk in forum Excel Programming / VBA / Macros
    Replies: 12
    Last Post: 08-16-2013, 03:43 AM
  3. Replies: 1
    Last Post: 05-29-2013, 01:20 PM
  4. Check if sheet exists in another workbook
    By arlu1201 in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 02-12-2013, 02:49 PM
  5. Check to see if a sheet exists
    By michaelbails in forum Excel Formulas & Functions
    Replies: 4
    Last Post: 05-26-2010, 01:08 AM
  6. Check if sheet exists problem
    By wilro85 in forum Excel Programming / VBA / Macros
    Replies: 8
    Last Post: 09-11-2007, 11:45 PM
  7. [SOLVED] check if the sheet/tag exists
    By Alex in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 03-14-2006, 05:10 PM
  8. [SOLVED] How to check from VBA if sheet exists?
    By Alen in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 03-02-2006, 08:40 AM

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