+ Reply to Thread
Results 1 to 14 of 14

Trying to determine if data matches from one sheet to another

  1. #1
    Forum Contributor
    Join Date
    11-13-2013
    Location
    California
    MS-Off Ver
    Excel 365 Apps for enterprise
    Posts
    180

    Trying to determine if data matches from one sheet to another

    I have a workbook with two sheets containing employee names and phone numbers. One was run last october, and one was run today. I am looking to determine who's telephone numbers have changed since October, so that we have the correct number's on file. I don't want to copy and paste, as there may be employees that are on one list and not the other, and there are over 1000 records. I would like to have a Yes/No result in the Changed? column on sheet 1.

    Also, I have alt. telephone on sheet 1 that I would like copied to sheet 2 when an exact name match is found. Is that possible as well?

    I've attached a small sample. Name's have been abbreviated, and phone numbers are made up ones.
    Attached Files Attached Files

  2. #2
    Forum Expert daffodil11's Avatar
    Join Date
    07-11-2013
    Location
    Phoenixville, PA
    MS-Off Ver
    MS Office 2016
    Posts
    4,465

    Re: Trying to determine if data matches from one sheet to another

    k2:
    =IF(SUMPRODUCT((Original!$A$2:$A$8=Today!A2)*(Original!$I$2:$I$8=Today!I2))=0,"Changed","")

    copy down
    Make Mom proud: Add to my reputation if I helped out!

    Make the Moderators happy: Mark the Thread as Solved if your question was answered!

  3. #3
    Forum Contributor
    Join Date
    11-13-2013
    Location
    California
    MS-Off Ver
    Excel 365 Apps for enterprise
    Posts
    180

    Re: Trying to determine if data matches from one sheet to another

    I don't think that formula will work, because all it's doing is looking at the line numbers and comparing, so once it reaches a name that's not there and compares the phone numbers, everyone after that says changed. Problem is not everybody is on both lists. So it needs to be matched to the name and then compared.
    Last edited by JennOlsen; 07-16-2015 at 04:45 PM.

  4. #4
    Forum Expert daffodil11's Avatar
    Join Date
    07-11-2013
    Location
    Phoenixville, PA
    MS-Off Ver
    MS Office 2016
    Posts
    4,465

    Re: Trying to determine if data matches from one sheet to another

    Are you saying you need the formula on both sheets?

    Comparing 'Today' to 'Original', only the top name on Today has a different number on the original. The other three are the same.

  5. #5
    Forum Contributor
    Join Date
    11-13-2013
    Location
    California
    MS-Off Ver
    Excel 365 Apps for enterprise
    Posts
    180

    Re: Trying to determine if data matches from one sheet to another

    When I use the formula on the actual sheet, about 10-15 names down, the names change. "Tom Jones" is on sheet 2, but not on sheet 1. When I use the formula given on sheet 1, it tells me that "John Smith" has a changed phone number when he doesn't, because it is comparing John's # with Tom's #. It continues to say Changed for every person after that because it's comparing the # for the wrong person.

    So because the names aren't the same on both sheets, every name after the first missing name that says the number is changed because it isn't comparing the names to make sure it's checking the phone # for the correct person.

  6. #6
    Forum Expert daffodil11's Avatar
    Join Date
    07-11-2013
    Location
    Phoenixville, PA
    MS-Off Ver
    MS Office 2016
    Posts
    4,465

    Re: Trying to determine if data matches from one sheet to another

    You're going to have to adjust the ranges and references.

    Make sure the criteria range points to the correct data source, and that the criteria is set to the current sheet.

  7. #7
    Forum Contributor
    Join Date
    11-13-2013
    Location
    California
    MS-Off Ver
    Excel 365 Apps for enterprise
    Posts
    180

    Re: Trying to determine if data matches from one sheet to another

    So I'm going to have to go through 1000+ names to figure out where it is different in the two sheets, so I can adjust the range for the telephone # each time that happens (it happens more than once)? There's no easier way?

  8. #8
    Forum Expert daffodil11's Avatar
    Join Date
    07-11-2013
    Location
    Phoenixville, PA
    MS-Off Ver
    MS Office 2016
    Posts
    4,465

    Re: Trying to determine if data matches from one sheet to another

    No no no, I mean you need to adjust what I provided to fit your need. Make sure you use absolute references and correct worksheet references.

    On Sheet1, the formula would look something similar to:

    =IF(SUMPRODUCT((Sheet2!$A$2:$A$1000=A2)*(Sheet2!$I$2:$I$1000=I2))=0,"Changed","")

    And Sheet2, something like:

    =IF(SUMPRODUCT((Sheet1!$A$2:$A$1000=A2)*(Sheet1!$I$2:$I$1000=I2))=0,"Changed","")

  9. #9
    Forum Contributor
    Join Date
    11-13-2013
    Location
    California
    MS-Off Ver
    Excel 365 Apps for enterprise
    Posts
    180

    Re: Trying to determine if data matches from one sheet to another

    Oooohhhh! That makes so much more sense. I'm a little slow today..

  10. #10
    Forum Expert daffodil11's Avatar
    Join Date
    07-11-2013
    Location
    Phoenixville, PA
    MS-Off Ver
    MS Office 2016
    Posts
    4,465

    Re: Trying to determine if data matches from one sheet to another

    It's okay, we all began somewhere!

    Today, I began in bed.

  11. #11
    Forum Contributor
    Join Date
    11-13-2013
    Location
    California
    MS-Off Ver
    Excel 365 Apps for enterprise
    Posts
    180

    Re: Trying to determine if data matches from one sheet to another

    Nope, still not doing what I need. I updated the formula with the correct range and it hit #61 and said his number changed, but it is comparing it to #61 on the original which is a different person. So everyone #61 and later say changed, but they aren't.

  12. #12
    Forum Expert daffodil11's Avatar
    Join Date
    07-11-2013
    Location
    Phoenixville, PA
    MS-Off Ver
    MS Office 2016
    Posts
    4,465

    Re: Trying to determine if data matches from one sheet to another

    Make sure you remove the sheet names from the criteria. Or if it helps, you can explicitly declare them.

    On Sheet1:
    =IF(SUMPRODUCT((Sheet2!$A$2:$A$1000=Sheet1!A2)*(Sheet2!$I$2:$I$1000=Sheet1!I2))=0,"Changed","")

    On Sheet2:
    =IF(SUMPRODUCT((Sheet1!$A$2:$A$1000=Sheet2!A2)*(Sheet1!$I$2:$I$1000=Sheet2!I2))=0,"Changed","")

  13. #13
    Forum Contributor
    Join Date
    11-13-2013
    Location
    California
    MS-Off Ver
    Excel 365 Apps for enterprise
    Posts
    180

    Re: Trying to determine if data matches from one sheet to another

    Excellent. Now it seems to be doing exactly what I need. Thank you so much!

  14. #14
    Forum Expert daffodil11's Avatar
    Join Date
    07-11-2013
    Location
    Phoenixville, PA
    MS-Off Ver
    MS Office 2016
    Posts
    4,465

    Re: Trying to determine if data matches from one sheet to another

    Hurray! Happiness for everyone!

+ 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. Pull data from one sheet to another if a company name matches
    By toddbn in forum Excel Formulas & Functions
    Replies: 5
    Last Post: 03-30-2015, 06:08 PM
  2. [SOLVED] Copy Column A data to Sheet 2 where rows matches Sheet 2 headers
    By SCDE in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 01-19-2015, 12:14 AM
  3. VBA to determine which sheet to pull data from
    By CFT Brian in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 11-07-2013, 01:55 AM
  4. [SOLVED] Array Formula - To determine exact matches
    By [email protected] in forum Excel Formulas & Functions
    Replies: 38
    Last Post: 11-10-2012, 01:17 AM
  5. Pull data from a specific sheet that matches cell value on Input Sheet
    By vaciaravino in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 10-12-2012, 08:38 PM
  6. Compare Sheet 1 and Sheet 2, and find matches and non-matches
    By danNAD in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 04-01-2010, 03:59 AM
  7. For n rows, determine if sum of column values matches criterion
    By SKAh in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 02-19-2010, 01:08 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