+ Reply to Thread
Results 1 to 7 of 7

Match sheets by Name, Date of Birth, and/or SSN

  1. #1
    Registered User
    Join Date
    05-31-2013
    Location
    San Diego
    MS-Off Ver
    Excel 2007
    Posts
    4

    Match sheets by Name, Date of Birth, and/or SSN

    I need to match two groups as close as possible and the data I have is First Name (A), Last Name(B), Date of Birth (C), Social Security Number(D). I have other extra columns in my files which I want to keep. I would like the match to be on 2 different levels: 1) by Social Security Number OR 2) by a combination of the first 3 letters of First Name or Last Name AND date of birth. The final matched worksheet will have: Sheet1 - matched records, Sheet2 - unmatched from the first file, Sheet3 - unmatched from the second file. (I will have to use this procedure for other files too but they will all have A,B,C,D defined as above). I am not very familiar with Visual Basic...so please, be patient with me. See attached an example of file that I have to match (in reality, there are thousands of records). Thank you, Bradulet
    Attached Files Attached Files

  2. #2
    Valued Forum Contributor tehneXus's Avatar
    Join Date
    04-12-2013
    Location
    Hamburg, Germany
    MS-Off Ver
    Work: MS-Office 2010 32bit @ Win8 32bit / Home: MS-Office 2016 32bit @ Win10 64bit
    Posts
    944

    Re: Match sheets by Name, Date of Birth, and/or SSN

    Hi,

    I have a few questions:
    1. The columns headings in the sheets "FirstFile" and "SecondFile" are not consistent, the names are different and the order too, how should a program match this?

    2. You are talking about "Files" all the time, is the data located in different files or are those just sheets? If these are files, where should the output go to?

    3. I found 3 matches by SSN but no one using a combination of birth date and 1st 3 letter of name, is that correct?
    Please use [CODE]-TAGS
    When your problem is solved mark the thread SOLVED
    If an answer has helped you please click to give reputation
    Read the FORUM RULES

  3. #3
    Forum Guru MarvinP's Avatar
    Join Date
    07-23-2010
    Location
    Woodinville, WA
    MS-Off Ver
    Office 365
    Posts
    16,167

    Re: Match sheets by Name, Date of Birth, and/or SSN

    Hi bradulet and welcome to the forum,

    Find the attached with a few helper columns on Sheet1 and some VLookup formulas on Sheet2 that I think are what you are looking for.
    Attached Files Attached Files
    One test is worth a thousand opinions.
    Click the * Add Reputation below to say thanks.

  4. #4
    Registered User
    Join Date
    05-31-2013
    Location
    San Diego
    MS-Off Ver
    Excel 2007
    Posts
    4

    Re: Match sheets by Name, Date of Birth, and/or SSN

    Sorry tehneXus, I put one file in one sheet and named it "FirstFile" and the other one in another sheet "SecondFile" thinking that it would be easier to have everything in one place. I think there are only 2 matches by ssn... The output would go in the same workbook.
    As for not naming the columns exactly...sigh...no excuse there.

  5. #5
    Registered User
    Join Date
    05-31-2013
    Location
    San Diego
    MS-Off Ver
    Excel 2007
    Posts
    4

    Re: Match sheets by Name, Date of Birth, and/or SSN

    Thanks Marvin,
    I appreciate you sending a solution promptly. It does seem to work and VLOOKUP was on my mind when I had to deal with this. The only problem I have with this approach is that, from what I know, in order for it to work properly one has to sort the file alphabetically by the variable that is being looked at.
    Also, when matching by SSN fails, I need a combination of "first 3 letters FirstName + first 3 letters LastName + DOB" for it to be considered valid (we're talking about thousands of records where there are duplicates of John Smith and the only differentiating factor is DOB).
    Should I understand that this isn't one of those "one stop shop"?
    Thanks again.
    Bradulet

  6. #6
    Forum Guru MarvinP's Avatar
    Join Date
    07-23-2010
    Location
    Woodinville, WA
    MS-Off Ver
    Office 365
    Posts
    16,167

    Re: Match sheets by Name, Date of Birth, and/or SSN

    Hi bradulet,

    If you use the "False" argument at the end of the VLookup, you don't need to have things sorted alphabetically. I don't understand the "one stop shop" reference.

    If you have lots of data there is likely two people having the same birthdate and first three letters of first or last names (or both). What do you expect to happen then? Big data sets have their problems.

    In N2 try this for a helper formula

    =LEFT(B2,3)&LEFT(A2,3)&D2

    Then do a VLookup on it like the others on Sheet2.
    Last edited by MarvinP; 06-03-2013 at 06:52 PM.

  7. #7
    Registered User
    Join Date
    05-31-2013
    Location
    San Diego
    MS-Off Ver
    Excel 2007
    Posts
    4

    Re: Match sheets by Name, Date of Birth, and/or SSN

    Hi Marvin,
    This new helper formula works nicely too. Thank you.
    Now, how can I get the rest of the matched records moved over into my SecondFile? (that's why I was saying a "one stop shop" ...a program to do it all in one step)
    I appreciate your patience with this.
    Bradulet

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

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