+ Reply to Thread
Results 1 to 8 of 8

Matching values across sheets

  1. #1
    Registered User
    Join Date
    12-01-2016
    Location
    Denmark
    MS-Off Ver
    Office 365 ProPlus
    Posts
    8

    Matching values across sheets

    Hi all

    Looking for support to create a function to help identify related entries across sheets.

    Criterias
    • Column A in sheet 1 should contain more than one entry of the Top Item ID. E.g. 6083966 has 8 entries. If only one entry the function should return a comment e.g. "6083967 only one entry". (Highlighted in blue)
    • If more than one entry in column A sheet 1, next step is to check if the Item ID in column B. If the Item ID has duplicates in either column A or B in sheet 2, the function should return a comment "Multiple entries in Sheet 2" (Highlighted in orange)
    • If there is only one entry in either column A or B in sheet 2, the function should match the related sibling. E.g. Item ID 6023864 has a sibling in sheet 2, 6179298. This goes both ways so that for Item ID 6179298 the function should return sibling 6023864 (Highlighted in Yellow)
    • Final step is to check the text in column C. A pair of siblings should always have both texts "Only Supp" and "Only Eng". (Highlighted in Gray)

    If all criterias are met the function should return an "OK Sibling XXXXXXX found" (Highlighted in Green)

    I am sure I can do this in VBA but for the sake of other users I would prefer if it was possible to do this in a formula instead.

    Looking forward to your feedback.
    Attached Files Attached Files

  2. #2
    Forum Expert
    Join Date
    10-09-2014
    Location
    Newcastle, England
    MS-Off Ver
    2003 & 2013
    Posts
    1,986

    Re: Matching values across sheets

    I have this close but no cigar, its correctly highlighting the 1st two criteria and is half way to doing the last one but is returning #NA for those matching rather than the value.

    Please Login or Register  to view this content.
    I'll keep looking at it but maybe your eyes might spot it straight away.
    If someone has helped you then please add to their Reputation

  3. #3
    Registered User
    Join Date
    12-01-2016
    Location
    Denmark
    MS-Off Ver
    Office 365 ProPlus
    Posts
    8

    Re: Matching values across sheets

    Hi
    Thank you for your quick reply. I looked at it and modified the formula "a bit" so that it returns the sibling

    Formula: copy to clipboard
    Please Login or Register  to view this content.


    I think this works. Next challenge is then to make sure the siblings match by looking at the Top Item ID and the Text Column. Grey and Green.
    I have attached an updated workbook with the new formula included.
    Attached Files Attached Files

  4. #4
    Forum Guru
    Join Date
    08-28-2014
    Location
    USA
    MS-Off Ver
    Excel 2019
    Posts
    17,703

    Re: Matching values across sheets

    If I understand correctly one of the siblings should correspond to the text "Only Supp" and the other to "Only Eng". If that is correct then the following formula will work as shown in column I of the attached copy of your file:
    Formula: copy to clipboard
    Please Login or Register  to view this content.
    Let us know if you have any questions.
    Attached Files Attached Files
    Consider taking the time to add to the reputation of everybody that has taken the time to respond to your query.

  5. #5
    Registered User
    Join Date
    12-01-2016
    Location
    Denmark
    MS-Off Ver
    Office 365 ProPlus
    Posts
    8

    Re: Matching values across sheets

    Looking at the enclosed file the only thing missing now would be to check that the siblings have the same parent from column A in sheet 1.
    I have tried to illustrate this in the enclosed workbook.
    • Siblings 6023864 & 6179298 is a match because they have the same parent, 6083966
    • "Fake" siblings 6023864 & 6179298 is not a match because they have different parents. 6023864 has parent 6083968 (Blue) and 6083969 has parent 6083969 (Grey
    )
    Attached Files Attached Files
    Last edited by michael.sejrup; 12-02-2016 at 02:35 AM.

  6. #6
    Forum Guru
    Join Date
    08-28-2014
    Location
    USA
    MS-Off Ver
    Excel 2019
    Posts
    17,703

    Re: Matching values across sheets

    Paste the following formula in G2, press enter and double click to copy down:
    Formula: copy to clipboard
    Please Login or Register  to view this content.
    Let us know if you have any questions.

  7. #7
    Registered User
    Join Date
    12-01-2016
    Location
    Denmark
    MS-Off Ver
    Office 365 ProPlus
    Posts
    8

    Re: Matching values across sheets

    Final piece of the puzzle as I missed out on this in my explanation.

    A couple of siblings are allowed to have different parents. I have tried to illustrate this in the enclosed file.
    • 6023864 is a sister of 6179298. They have the parent 6083966 = Match
    • 6023864 is a sister of 6179298. But they also have the parent 6083967 (orange) = Match.

    At the moment if there are more siblings with different parents, only the first show as a match. Subsequent matches show as No Match despite being ok (highlighted in red). Looks to me like it might have something to do with the index match part of the formula?
    Attached Files Attached Files
    Last edited by michael.sejrup; 12-06-2016 at 09:38 AM.

  8. #8
    Forum Guru
    Join Date
    08-28-2014
    Location
    USA
    MS-Off Ver
    Excel 2019
    Posts
    17,703

    Re: Matching values across sheets

    Some helper columns have been added (columns H:L), which may be moved or hidden for aesthetic purposes, and employ the array entered formula:
    Formula: copy to clipboard
    Please Login or Register  to view this content.
    The (now) array entered formula* in column G reads:
    Formula: copy to clipboard
    Please Login or Register  to view this content.
    The cells previously highlighted in red now display as match as well as G11 which I think is correct now that the 'Top Item ID' for that line is now being used more than once.
    * Array entered formulas are activated by pressing CTRL+SHIFT+ENTER to activate the array, not just ENTER. You will know the array is active when you see curly braces { } appear around your formula. If you do not CTRL+SHIFT+ENTER you will get an error or a clearly incorrect answer.
    Let us know if you have any questions.
    Attached Files Attached Files

+ 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. Lookup on matching values on seperate sheets.
    By land35 in forum Excel General
    Replies: 4
    Last Post: 04-17-2015, 07:35 AM
  2. Formula for matching values in two different sheets, then getting a sum?
    By wench_02 in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 08-13-2014, 09:11 AM
  3. [SOLVED] Matching Values in Two Sheets for Databasing
    By smutimer in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 04-03-2013, 08:06 PM
  4. Find and list matching values in different sheets
    By MindToAsk in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 02-01-2013, 07:31 AM
  5. Replies: 6
    Last Post: 11-15-2012, 12:30 PM
  6. matching values from a list and multiple sheets
    By meacho in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 09-06-2007, 10:12 AM
  7. Help on Matching and Copying Values In Two Different Sheets
    By sylink in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 06-02-2006, 12:50 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