+ Reply to Thread
Results 1 to 4 of 4

Compare data from Sheet2 to a summary table on Sheet1

  1. #1
    Registered User
    Join Date
    05-17-2013
    Location
    Moon
    MS-Off Ver
    Excel 2013
    Posts
    20

    Lightbulb Compare data from Sheet2 to a summary table on Sheet1

    I'm attaching an excell sheet with sample data and desired output in RawData

    RawData contains every record where same name may be repeating multiple times.
    KeyData has unique key to define the ID for each type

    If Name in RawData sheet matches Name in Key Name column, then copy ID to RawData from Matching Key ID.

    Closest I could get if there was a matching column,

    =IFERROR(VLOOKUP(B2,Key!$B$2:$B$24,1,0),"No match")

    However, when I try to expand it, my logic is lost somewhere

    =VLOOKUP(IFERROR(VLOOKUP(B2,Key!$B$2:$B$24,1,0),"No match"),Key!$A$2:$A$24,1,0)

    Thanks for help!
    Attached Files Attached Files

  2. #2
    Administrator FDibbins's Avatar
    Join Date
    12-29-2011
    Location
    Duncansville, PA USA
    MS-Off Ver
    Excel 7/10/13/16/365 (PC ver 2310)
    Posts
    53,048

    Re: Compare data from Sheet2 to a summary table on Sheet1

    Try this, copied down...

    =INDEX(Key!$A$1:$A$24,MATCH(RawData!B2,Key!$B$1:$B$24,0),1)

    vlookup() cannot look "behind" itself - it cannot look to the left of what it is searching for
    1. Use code tags for VBA. [code] Your Code [/code] (or use the # button)
    2. If your question is resolved, mark it SOLVED using the thread tools
    3. Click on the star if you think someone helped you

    Regards
    Ford

  3. #3
    Registered User
    Join Date
    05-17-2013
    Location
    Moon
    MS-Off Ver
    Excel 2013
    Posts
    20

    Thumbs up Re: Compare data from Sheet2 to a summary table on Sheet1

    Thank you for a fast reply. Worked perfectly!

  4. #4
    Administrator FDibbins's Avatar
    Join Date
    12-29-2011
    Location
    Duncansville, PA USA
    MS-Off Ver
    Excel 7/10/13/16/365 (PC ver 2310)
    Posts
    53,048

    Re: Compare data from Sheet2 to a summary table on Sheet1

    Happy to help and thanks for the feedback

+ 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