+ Reply to Thread
Results 1 to 3 of 3

VLOOKUP Multiple Occurences of Same Reference?

  1. #1
    Registered User
    Join Date
    01-06-2009
    Location
    New York, USA
    MS-Off Ver
    Excel 2003
    Posts
    2

    VLOOKUP Multiple Occurences of Same Reference?

    Hi All,

    I have a worksheet (attached, "Sheet 1) in which I have multiple instances of the same ID that are associated with different comments. I need to find a way to dump these comments into the SAME row (with the ID in Column A of this row). Can anyone help me out here?

    I can't use a Pivot Table because there is a character limit when I run one (the comments can be quite long).

    Thanks so much!
    Attached Files Attached Files

  2. #2
    Forum Guru DonkeyOte's Avatar
    Join Date
    10-22-2008
    Location
    Northumberland, UK
    MS-Off Ver
    O365
    Posts
    21,531
    not overly efficient but on Sheet1:

    C2: =$A2&":"&COUNTIF($A$1:$A2,$A2)
    copy down

    then on Sheet2:

    B2: =IF((COLUMN(B2)-COLUMN($A2))>COUNTIF(Sheet1!$A$1:$A$1000,$A2),"",INDEX(Sheet1!$B$1:$B$1000,MATCH($A2&":"&COLUMN(B2)-COLUMN($A2),Sheet1!$C$1:$C$1000,0),1))

    Apply the above across your comments matrix... I would personally insert a column onto Sheet2 to hold result of COUNTIF (or place in a column way off to the right) such that you don't need to call it in each cell in the comments matrix (hideously inefficient) -- you can simply reference the cell holding the result of the COUNTIF... eg assume

    Z2: =COUNTIF(Sheet1!$A$1:$A$1000,$A2)

    Then:

    B2: =IF((COLUMN(B2)-COLUMN($A2))>$Z2,"",INDEX(Sheet1!$B$1:$B$1000,MATCH($A2&":"&COLUMN(B2)-COLUMN($A2),Sheet1!$C$1:$C$1000,0),1))
    Apply across range as before.

    Note the above are based on your sample file layout.
    Last edited by DonkeyOte; 01-06-2009 at 12:04 PM.

  3. #3
    Registered User
    Join Date
    01-06-2009
    Location
    New York, USA
    MS-Off Ver
    Excel 2003
    Posts
    2

    Thank You!!

    Oh my god. You have no idea how much time you have saved me (at least 20-30 hours over the next year). I work for a nonprofit organization and we will be using this spreadsheet to help hundreds of individuals on our staff improve their performance based on survey results we receive. I am truly grateful for your help here!

    THANKS!

+ 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