+ Reply to Thread
Results 1 to 7 of 7

Vlookup to return multiple row from different worksheet

Hybrid View

  1. #1
    Registered User
    Join Date
    03-18-2009
    Location
    Canada
    MS-Off Ver
    Excel 2003
    Posts
    9

    Cool Vlookup to return multiple row from different worksheet

    Hi,

    I'm sure this question has been ask multiple times, so I apologize for asking it again :D I tried to google this and found a few suggested solutions, but for some reason I'm having trouble applying them to my scenario.

    So I have this workbook containing 2 spreadsheets -> Comp and Daily Report

    The comp sheet has information, combination of text and numbers, entered starting with the date it occured. It's a rolling sheet for the entire month. The daily report sheet is supposed to be the print friendly, per day version of this sheet. It uses lookup to pull information from the comp sheet based on date entered on the daily report in D2. Formula looks like this:

    (in cell B5): =LOOKUP($D$2,Comps!A2:A100,Comps!B2:B100)
    (in cell C5): =LOOKUP($D$2,Comps!A2:A100,Comps!C2:C100)
    (in cell D5): =LOOKUP($D$2,Comps!A2:A100,Comps!D2:D100)
    (in cell E5): =LOOKUP($D$2,Comps!A2:A100,Comps!E2:E100)


    Now that works all nice and shiny, but what if the comp sheet has more than one row for the same date? That is where my problem lies. So I would want to have the first instance in row 5 on the daily report, the 2nd instance in row 6, next in row 7 and so on and so forth.

    Hope that makes any sense :D here some screenshots comps.JPGdaily report.JPG

    How would I accomplish that?

    Thanks so much for the help!

  2. #2
    Forum Guru :) Sixthsense :)'s Avatar
    Join Date
    01-01-2012
    Location
    India>Tamilnadu>Chennai
    MS-Off Ver
    2003 To 2010
    Posts
    12,770

    Re: Vlookup to return multiple row from different worksheet

    Please attach a sample workbook with enough data to make it clear what is needed. Include a BEFORE sheet and an AFTER sheet in the workbook if needed to show the process you're trying to complete or automate. Make sure your desired results are demonstrated, mock them up manually if needed. Remember to desensitize the data.

    Click on GO ADVANCED and use the paperclip icon to open the upload window.

    View Pic

    Note: Please don't attach documents containing confidential data like (address, telephone, ID#s, etc.).


    If your problem is solved, then please mark the thread as SOLVED>>Above your first post>>Thread Tools>>
    Mark your thread as Solved


    If the suggestion helps you, then Click *below to Add Reputation

  3. #3
    Valued Forum Contributor
    Join Date
    05-20-2013
    Location
    Ohio, USA
    MS-Off Ver
    Excel 2013
    Posts
    941

    Re: Vlookup to return multiple row from different worksheet

    See if attached works for you...

    [xls generated by XL2010]
    Attached Files Attached Files

  4. #4
    Registered User
    Join Date
    03-18-2009
    Location
    Canada
    MS-Off Ver
    Excel 2003
    Posts
    9

    Re: Vlookup to return multiple row from different worksheet

    Quote Originally Posted by jhren View Post
    See if attached works for you...

    [xls generated by XL2010]
    Exactly what I was looking for! Thanks so much Jhren

  5. #5
    Valued Forum Contributor
    Join Date
    05-20-2013
    Location
    Ohio, USA
    MS-Off Ver
    Excel 2013
    Posts
    941

    Re: Vlookup to return multiple row from different worksheet

    You're Welcome...!!!

  6. #6
    Banned User!
    Join Date
    10-14-2006
    Posts
    1,211

    Re: Vlookup to return multiple row from different worksheet

    Quote Originally Posted by jhren View Post
    See if attached works for you...

    [xls generated by XL2010]
    =IF(ISERROR(INDEX(Comps!B$2:B$1000,SMALL(IF(Comps!$A$2:$A$1000=$D$2,ROW(Comps!$A$2:$A$1000)-1,10^10),ROW()-4))),"",INDEX(Comps!B$2:B$1000,SMALL(IF(Comps!$A$2:$A$1000=$D$2,ROW(Comps!$A$2:$A$1000)-1,10^10),ROW()-4)))

    @jhren, don't use error trap the whole formula. It looks twice as long.


    Try it like this...

    =LOOKUP("zzz",CHOOSE({1,2},"",INDEX(Comps!B:B,SMALL(IF(Comps!$A$2:$A$52=$D$2,ROW(Comps!B$2:B$52)),ROWS(B$5:B5)))))


    Array formula: Press Ctrl+Shift+Enter, not just Enter

  7. #7
    Valued Forum Contributor
    Join Date
    05-20-2013
    Location
    Ohio, USA
    MS-Off Ver
    Excel 2013
    Posts
    941

    Re: Vlookup to return multiple row from different worksheet

    Quote Originally Posted by Teethless mama View Post
    @jhren, don't use error trap the whole formula. It looks twice as long.

    Try it like this...

    =LOOKUP("zzz",CHOOSE({1,2},"",INDEX(Comps!B:B,SMALL(IF(Comps!$A$2:$A$52=$D$2,ROW(Comps!B$2:B$52)),ROWS(B$5:B5)))))


    Array formula: Press Ctrl+Shift+Enter, not just Enter
    I've seen that method before, but don't have need to use often enough to remember it.

    In 2010 I use...

    =IFERROR(INDEX(Comps!B$2:B$1000,SMALL(IF(Comps!$A$2:$A$1000=$D$2,ROW(Comps!$A$2:$A$1000)-1,10^10),ROW()-4)),"")

+ 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. VLookup with multiple return cells - Can I sum these up?
    By AnnaG87 in forum Excel Formulas & Functions
    Replies: 4
    Last Post: 07-24-2013, 03:36 PM
  2. Replies: 3
    Last Post: 05-14-2013, 09:01 AM
  3. VLookup - Return multiple values in multiple cells HELP
    By sreeves1 in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 11-02-2012, 12:58 PM
  4. Worksheet function Vlookup and VLOOKUP return different results
    By zandero in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 08-08-2010, 08:24 AM
  5. [SOLVED] VLOOKUP to return multiple rows
    By Miss Marple in forum Excel Formulas & Functions
    Replies: 0
    Last Post: 09-19-2005, 04:06 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