+ Reply to Thread
Results 1 to 3 of 3

Excel 2007 : Comparing and matching data on two different spreadsheets

  1. #1
    Registered User
    Join Date
    01-24-2012
    Location
    London, England
    MS-Off Ver
    Excel 2007
    Posts
    3

    Comparing and matching data on two different spreadsheets

    Hi,

    I am trying to complete a mailing list, and want to match data from two spreadsheets.

    Sheet1 contains a list of all my contacts, and Sheet2 contains a list of some of these contacts, the ones I do not want to include in my mailing. I basically want to remove all the contacts on Sheet2 from Sheet1, how do I do this?

    Grateful for any help.

  2. #2
    Forum Contributor arlu1201's Avatar
    Join Date
    09-09-2011
    Location
    Bangalore, India
    MS-Off Ver
    Excel 2003 & 2007
    Posts
    19,167

    Re: Comparing and matching data on two different spreadsheets

    It would be good if you attach a sample file with both your sheets.
    If I have helped, Don't forget to add to my reputation (click on the star below the post)
    Don't forget to mark threads as "Solved" (Thread Tools->Mark thread as Solved)
    Use code tags when posting your VBA code: [code] Your code here [/code]

  3. #3
    Registered User
    Join Date
    01-24-2012
    Location
    London, England
    MS-Off Ver
    Excel 2007
    Posts
    3

    Re: Comparing and matching data on two different spreadsheets

    Thankfully I managed to get some help yesterday.

    Both spreadsheets include a column each with unique IDs for each contact, which makes it easier to compare them.

    I insterted a new column in Spreadsheet1 (the one with all contacts), next to the Contact ID column and used =VLOOKUP.

    Lookup_value: First cell in the ContactID column of Spreadsheet1, "A1"
    Table_array: Whole ContactID column of Spreadsheet2 (the one with the contacts I wanted to remove from Spreadsheet1), "[Spreadsheet2.xls]Sheet1'!$A$2:$A$147"
    Col_index_num: 1
    Range_lookup: FALSE

    Code: =VLOOKUP(A2,[Spreadsheet2]Sheet1!$A$1:$A$106,1,FALSE)

    This way I matched all the IDs from Spreadsheet2 with the ones in Spreadsheet1 and could then remove them from my mailing list.

    Hopefully this will help someone else with the same issue like me!

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

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