+ Reply to Thread
Results 1 to 9 of 9

how to use vlookup for multiples rows

  1. #1
    Forum Contributor
    Join Date
    07-25-2019
    Location
    Dhaka, Bangladesh
    MS-Off Ver
    2016
    Posts
    200

    how to use vlookup for multiples rows

    Dear All,
    if multiple rows required through vlookup then how i can do this, attached file for your convenience.

    NB: if the title is not matched with my query then please excuse me.

    TIA
    Attached Files Attached Files

  2. #2
    Forum Expert Sam Capricci's Avatar
    Join Date
    06-14-2012
    Location
    Palm Harbor, Florida
    MS-Off Ver
    16.84 for Mac MS 365
    Posts
    8,499

    Re: how to use vlookup for multiples rows

    this will work for you but the way you set up the output box with one ID for each box, you'll have to keep changing the reference cell...
    =LOOKUP(2,1/($A$2:$A$10=$F$2)/($B$2:$B$10=H2),$C$2:$C$10)
    so I locked in F2 so it stays pointed at that cell but when you use it for nabi you'll need to change it to ...
    =LOOKUP(2,1/($A$2:$A$10=$F$7)/($B$2:$B$10=H2),$C$2:$C$10)
    unless you put nas also in F3 and F4 and nabi in F8 and F9 etc, then you can drop the absolute reference to $F$2 and instead use just F2.
    hope that makes sense.
    Make contributors happy, click on the "* Add Reputation" as a way to say thank you.
    Sam Capricci

  3. #3
    Forum Expert
    Join Date
    05-05-2015
    Location
    UK
    MS-Off Ver
    Microsoft Excel for Microsoft 365 MSO (Version 2402 Build 16.0.17328.20068) 64-bit
    Posts
    28,205

    Re: how to use vlookup for multiples rows

    Try

    =IFERROR(INDEX(B$2:B$100,AGGREGATE(15,6,ROW($A$1:$A$100)/($A$2:$A$100=$F$2),ROWS($1:1))),"")

    copy across to C and down to last entry for selected ID

    As your output stands, you will need to change highlighted value for each ID block. Not very practical if you have large number of IDs.
    If that takes care of your original question, please select Thread Tools from the menu link above and mark this thread as SOLVED.

  4. #4
    Forum Contributor
    Join Date
    07-25-2019
    Location
    Dhaka, Bangladesh
    MS-Off Ver
    2016
    Posts
    200

    Re: how to use vlookup for multiples rows

    Sam Capricci thanks for your reply, however i didn't get you, could you please show in the excel file please .

  5. #5
    Forum Expert Sam Capricci's Avatar
    Join Date
    06-14-2012
    Location
    Palm Harbor, Florida
    MS-Off Ver
    16.84 for Mac MS 365
    Posts
    8,499

    Re: how to use vlookup for multiples rows

    ok, see the difference in the formula with absolute reference in the formula in cell J2 and copied down vs the formula in J7 copied down.
    I left nas in only F2 while putting nabi in F7 and F8 etc. John also referred to the issue in his response.
    Attached Files Attached Files

  6. #6
    Forum Expert
    Join Date
    05-05-2015
    Location
    UK
    MS-Off Ver
    Microsoft Excel for Microsoft 365 MSO (Version 2402 Build 16.0.17328.20068) 64-bit
    Posts
    28,205

    Re: how to use vlookup for multiples rows

    See attached which uses relative references as Sam's suggestion so you simply copy/paste to each ID block

    =IFERROR(INDEX(B$2:B$10,AGGREGATE(15,6,ROW($A$1:$A$100)/($A$2:$A$10=$F2),COUNTIF($F$2:$F2,$F2))),"")
    Attached Files Attached Files

  7. #7
    Forum Contributor
    Join Date
    07-25-2019
    Location
    Dhaka, Bangladesh
    MS-Off Ver
    2016
    Posts
    200

    Re: how to use vlookup for multiples rows

    thanks a lot JohnTopley & Sam Capricci, its working

  8. #8
    Forum Expert
    Join Date
    05-05-2015
    Location
    UK
    MS-Off Ver
    Microsoft Excel for Microsoft 365 MSO (Version 2402 Build 16.0.17328.20068) 64-bit
    Posts
    28,205

    Re: how to use vlookup for multiples rows

    ... and why are doing this anyway ???

  9. #9
    Forum Expert Sam Capricci's Avatar
    Join Date
    06-14-2012
    Location
    Palm Harbor, Florida
    MS-Off Ver
    16.84 for Mac MS 365
    Posts
    8,499

    Re: how to use vlookup for multiples rows

    You're welcome, and don't forget, clicking on * Add Reputation below the post of any or all of those who've stopped by to help is always welcome, it is how we advance on this forum.

+ 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. Delete rows that aren't multiples of 5 in timestamp
    By tisahardknocklife in forum Excel General
    Replies: 11
    Last Post: 01-19-2020, 06:42 AM
  2. [SOLVED] Multiples Index/Match/Multiples Columns But to be concatenate in respective Rows
    By AndyJr in forum Excel Programming / VBA / Macros
    Replies: 23
    Last Post: 12-09-2018, 11:21 PM
  3. [SOLVED] VLOOKUP with multiples
    By jscalem in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 02-04-2014, 04:10 PM
  4. [SOLVED] Vlookup not working as multiples of given word and not exact match's.
    By oneblondebrow in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 03-19-2013, 11:32 AM
  5. [SOLVED] Pasting Multiples of a Series of Rows
    By StevenBleich in forum Excel General
    Replies: 5
    Last Post: 06-14-2012, 08:22 AM
  6. VLookup returning same data when multiples exist
    By Laserfast in forum Excel General
    Replies: 8
    Last Post: 05-12-2011, 12:56 PM
  7. Count rows in multiples of 'X' & highlight?
    By Major in forum Excel Programming / VBA / Macros
    Replies: 10
    Last Post: 08-15-2006, 07:45 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