+ Reply to Thread
Results 1 to 7 of 7

VLOOKUP to return multiple cells of same lookup value

  1. #1
    Registered User
    Join Date
    04-25-2012
    Location
    usa
    MS-Off Ver
    Excel 2003
    Posts
    6

    VLOOKUP to return multiple cells of same lookup value

    Hello,

    I am new to this forum and hopefully you can help me.

    I am trying to use some Vlookup formulas in the tab "called vlookup claims", the reference values are the member IDs. I need the vlook to look in the tab "called claims" and return the claim number in each one of the colums. I know I have no more than 5 claims per member id. so, I want each one of those claims in separate colums.

    Thanks!!
    Attached Files Attached Files
    Last edited by gerardog92; 04-26-2012 at 03:17 PM.

  2. #2
    Forum Expert dilipandey's Avatar
    Join Date
    12-05-2011
    Location
    Dubai, UAE
    MS-Off Ver
    1997 - 2016
    Posts
    8,191

    Re: VLOOKUP to return multiple cells of same lookup value

    Hi gerardog92,

    You can use the below array formula to get the desired result:-

    {=IF(ISERROR(INDEX(claims!$A$1:$C$1204,SMALL(IF(claims!$A$2:$A$1204=$A2,ROW(claims!$A$2:$A$1204),""),COLUMN(A$1)),2)),"",INDEX(claims!$A$1:$C$1204,SMALL(IF(claims!$A$2:$A$1204=$A2,ROW(claims!$A$2:$A$1204),""),COLUMN(A$1)),2))}

    sample file BCS 2011 vlookup.zipBCS 2011 vlookup.zip

    regards,
    DILIPandey

    <click on below 'star' if this helps>
    DILIPandey, Excel rMVP
    +919810929744 (India), +971528225509 (Dubai), [email protected]

  3. #3
    Forum Expert Cutter's Avatar
    Join Date
    05-24-2004
    Location
    Ontario,Canada
    MS-Off Ver
    Excel 2010
    Posts
    6,451

    Re: VLOOKUP to return multiple cells of same lookup value

    Non array alternative - assumes your list on the Claims sheet is sorted (as per your example)

    In B2 and copied down: =INDEX(claims!$B:$B,MATCH($A2,claims!$A:$A,0))

    and in C2 copied over and down: =IF(COUNTIF(claims!$A:$A,$A2)>COLUMN(A1),INDEX(claims!$B:$B,MATCH($A2,claims!$A:$A,0)+COLUMN(A1)),"")

  4. #4
    Forum Guru (RIP) Marcol's Avatar
    Join Date
    12-23-2009
    Location
    Fife, Scotland
    MS-Off Ver
    Excel '97 & 2003/7
    Posts
    7,216

    Re: VLOOKUP to return multiple cells of same lookup value

    Try this workbook, data need not be sorted.

    1/. Change your formula in Sheet "claims" C2 to ...
    Please Login or Register  to view this content.
    Drag/Fill down as required.

    2/. Create a dynamic Named Range "ClaimsData"
    Refers to:=
    Please Login or Register  to view this content.
    3/. Put this in Sheet"vlookup claims" A2
    Please Login or Register  to view this content.
    Drag Down until a blank cell is returned, then a bit more.
    This will give you a list of Unique IDs

    4/. In B2, this array formula
    Please Login or Register  to view this content.
    Confirm with Ctrl+Shift+Enter not just Enter.
    Drag Across and down as required
    Attached Files Attached Files
    Last edited by Marcol; 04-26-2012 at 02:26 PM.
    If you need any more information, please feel free to ask.

    However,If this takes care of your needs, please select Thread Tools from menu above and set this topic to SOLVED. It helps everybody! ....

    Also
    اس کی مدد کرتا ہے اگر
    شکریہ کہنے کے لئے سٹار کلک کریں
    If you are satisfied by any members response to your problem please consider using the small Star icon bottom left of their post to show your appreciation.

  5. #5
    Registered User
    Join Date
    04-25-2012
    Location
    usa
    MS-Off Ver
    Excel 2003
    Posts
    6

    Re: VLOOKUP to return multiple cells of same lookup value

    Thank you this is great!!

  6. #6
    Registered User
    Join Date
    04-25-2012
    Location
    usa
    MS-Off Ver
    Excel 2003
    Posts
    6

    Re: VLOOKUP to return multiple cells of same lookup value

    Hola!

    Thank you this is awesome!! this realy works

  7. #7
    Registered User
    Join Date
    01-24-2014
    Location
    Hong Kong
    MS-Off Ver
    Excel 14.0.7106.5003
    Posts
    1

    Re: VLOOKUP to return multiple cells of same lookup value - the reverse situation...

    Nice.
    I have a similar problem, but in reverse. To keep it simple, imagine I have your "vlookup claims" sheet as my source data. In other words, multiple columns of claims numbers and a single MENBID column at the left, exactly what you show in your spreadsheet example. I want to extract the equivalent of your "claims" sheet as my output. I don't need the "number of claims" column, just a single column of MEMBID and a single column of CLAIMNO exactly as shown in your example.
    Any ideas?
    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