+ Reply to Thread
Results 1 to 8 of 8

Comparing two data sets and finding matches or non matches

  1. #1
    Registered User
    Join Date
    09-25-2017
    Location
    England
    MS-Off Ver
    2016
    Posts
    5

    Comparing two data sets and finding matches or non matches

    Hello,

    I have a frazzled brain when trying to think up the correct formula, I have a spreadsheet, see attached, that I'm trying to compare to determine matches.

    I have a list of ObjectIDs from a spreadsheet, 406 records, listed with the status of their investigations (In Progress or Completed) and a list of ObjectIDs extracted from a main database with the status of their investigations.

    Effectively, I'm after a list of what records do not match i.e. In Progress from QuerySpreadsheet Extract vs Completed in Main Database Extract.

    Hopefully this makes sense,

    Thanks!
    Attached Files Attached Files

  2. #2
    Registered User
    Join Date
    11-17-2012
    Location
    San Antonio
    MS-Off Ver
    Excel 2010
    Posts
    8

    Re: Comparing two data sets and finding matches or non matches

    This might help....It was provided to me when I had a similar issue.

    Try this with your rows of data in column A and the 200 unique numbers added to the name manager with a name of MyUniqueList.

    Conditional Formatting
    Highlight applicable range >> A1:A2000
    Home Tab >> Styles >> Conditional Formatting
    New Rule >> Use a formula to determine which cells to format
    Edit the Rule Description: Format values where this formula is true: =ISNUMBER(MATCH(A1,MyUniqueList,0))
    Format… [Number, Font, Border, Fill]
    OK >> OK

  3. #3
    Forum Moderator davesexcel's Avatar
    Join Date
    02-19-2006
    Location
    Regina
    MS-Off Ver
    MS 365
    Posts
    13,482

    Re: Comparing two data sets and finding matches or non matches

    Also in a different column for example: start formula in E3 and drag down
    Formula: copy to clipboard
    Please Login or Register  to view this content.

    0 result would be no matches

  4. #4
    Forum Moderator Glenn Kennedy's Avatar
    Join Date
    07-08-2012
    Location
    Digital Nomad... occasionally based in Ireland.
    MS-Off Ver
    O365 (PC) V 2403
    Posts
    44,063

    Re: Comparing two data sets and finding matches or non matches

    You did not give any expected answers... and 2700 rows is rather a lot to check through (!!!). Try this array formula:

    =IFERROR(INDEX(A:A, SMALL(IF(ISERROR(MATCH($A$3:$A$407&$B$3:$B$407,$C$3:$C$2745&$D$3:$D$2745, 0)), (ROW($A$3:$A$407))), ROWS($F$2:F2))),"")

    in F2, copied down. It returns 3 results...

    Array Formulae are a little different from ordinary formulae in that they MUST be confirmed in the FIRST CELL ONLY by pressing CTRL+SHIFT+ENTER to activate the array, not just ENTER. After that, the array can be dragged down as normal, to cover the desired range.

    You will know the array is active when you see curly brackets { } - or "curly braces" for those of you in the USA, or "flower brackets" for those of you in India - appear around the outside of your formula. If you do not use CTRL+SHIFT+ENTER you will (almost always) get an error message or an incorrect answer. Press F2 on that cell and try again.

    Don't type the curly brackets yourself - it won't work...
    Attached Files Attached Files
    Glenn




    None of us get paid for helping you... we do this for fun. So DON'T FORGET to say "Thank You" to all who have freely given some of their time to help YOU.

    Temporary addition of accented to illustrate ongoing problem to the TT: L? fh?ile P?draig sona dhaoibh

  5. #5
    Forum Expert CK76's Avatar
    Join Date
    06-16-2015
    Location
    ONT, Canada
    MS-Off Ver
    MS365 Apps for enterprise
    Posts
    5,887

    Re: Comparing two data sets and finding matches or non matches

    I'd structure it bit differently.

    Convert each list into Excel Table.

    Then load both to PowerQuery/Get & Transform as connection only. Make sure both ID & Status columns are in text data type.

    Then create reference to Query Sheet table. Merge DB Extract table into reference created.

    Using both ID & Status column, do a Left Anti join.

    You should see 3 items from Query Sheet with Status In Progress. This is the mismatch.

    Alternately, if you want to see what the source of mismatch is. You can do Left Outer Join and expand the joined table (keeping only status column). This will show you the mismatch on status. You can then add filter flag column with formula.
    Please Login or Register  to view this content.
    Then filter on the column to show only "FALSE".

    See attached sample.
    Attached Files Attached Files
    ?Progress isn't made by early risers. It's made by lazy men trying to find easier ways to do something.?
    ― Robert A. Heinlein

  6. #6
    Forum Moderator Glenn Kennedy's Avatar
    Join Date
    07-08-2012
    Location
    Digital Nomad... occasionally based in Ireland.
    MS-Off Ver
    O365 (PC) V 2403
    Posts
    44,063

    Re: Comparing two data sets and finding matches or non matches

    At least we agree on the answer... if not on the method!!

  7. #7
    Registered User
    Join Date
    09-25-2017
    Location
    England
    MS-Off Ver
    2016
    Posts
    5

    Re: Comparing two data sets and finding matches or non matches

    I kinda forgot about any desired results, to be honest. I didn't know how accurate my data was, this was like a human error check.

    3 results however seemed about right. After pasting your formula Glenn it gave me 426192, which when I check this ObjectID in the Main DB / Spreadsheet, it was set to completed in the DB and In Progress in the Spreadsheet which was exactly what I was after!

    Many thanks to ExcelJET and Dave for the additional learning experience

    Edit, thanks CK76 as well :D

  8. #8
    Forum Moderator Glenn Kennedy's Avatar
    Join Date
    07-08-2012
    Location
    Digital Nomad... occasionally based in Ireland.
    MS-Off Ver
    O365 (PC) V 2403
    Posts
    44,063

    Re: Comparing two data sets and finding matches or non matches

    You're welcome.



    If that takes care of your original question, please select "Thread Tools" from the menu link above and mark this thread as SOLVED.

    It'd also be appreciated if you were to click the Add Reputation button at the foot of any of the posts of all members who helped you reach a solution.

+ 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] Comparing sets of data for matches
    By cspearsall in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 02-25-2016, 09:51 AM
  2. Comparing Data between sheets to find matches and no matches
    By tysont in forum Excel Formulas & Functions
    Replies: 8
    Last Post: 03-26-2015, 03:07 PM
  3. Replies: 2
    Last Post: 09-15-2014, 09:58 AM
  4. [SOLVED] Best way of finding matches between two data sets
    By SEMMatt in forum Excel Formulas & Functions
    Replies: 8
    Last Post: 08-04-2014, 06:35 AM
  5. Finding Rows with Multiple Cell Matches Between Two Data Sets
    By jmac1947 in forum Excel Programming / VBA / Macros
    Replies: 7
    Last Post: 07-20-2014, 04:02 PM
  6. Finding matches on six criteria in two data sets on two different worksheets
    By jake diamond in forum Hello..Introduce yourself
    Replies: 1
    Last Post: 01-23-2014, 10:22 PM
  7. Replies: 3
    Last Post: 09-11-2009, 09:08 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