+ Reply to Thread
Results 1 to 10 of 10

Vlookup on multiple sheets

  1. #1
    Forum Contributor
    Join Date
    06-07-2013
    Location
    Pakistan
    MS-Off Ver
    Excel 2013
    Posts
    167

    Vlookup on multiple sheets

    Hello, I am Abdul Rouf Roofi, Document Controller from Descon Engineering Limited Pakistan. I came to this forum through google and i would appreciate if someone help me to use Vlookup on multiple sheets. I am attaching my worksheet here for kind perusal.

    Thanks
    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
    52,969

    Re: Vlookup on multiple sheets

    Hi and welcome to the forum

    Change your formula to this...
    =VLOOKUP(G$5,INDIRECT(LEFT(G5,2)&"!D2:Q10"),2,0)
    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
    06-07-2013
    Location
    Nairobi
    MS-Off Ver
    Excel 2007
    Posts
    3

    Re: Vlookup on multiple sheets

    Enter the following formulas in each of the three cells:

    =+IFERROR(VLOOKUP(G$5,RR!D:Q,2,0),IFERROR(VLOOKUP(G$5,PF!D:Q,2,0),IFERROR(VLOOKUP(G$5,SA!D:Q,2,0),IFERROR(VLOOKUP(G$5,SI!D:Q,2,0),IFERROR(VLOOKUP(G$5,MR!D:Q,2,0),IFERROR(VLOOKUP(G$5,FB!D:Q,2,0),"Could Not Be Found"
    ))))))


    =+IFERROR(VLOOKUP(G$5,RR!D:Q,3,0),IFERROR(VLOOKUP(G$5,PF!D:Q,3,0),IFERROR(VLOOKUP(G$5,SA!D:Q,3,0),IFERROR(VLOOKUP(G$5,SI!D:Q,3,0),IFERROR(VLOOKUP(G$5,MR!D:Q,3,0),IFERROR(VLOOKUP(G$5,FB!D:Q,3,0),"Could Not Be Found"
    ))))))


    =+IFERROR(VLOOKUP(G$5,RR!D:Q,10,0),IFERROR(VLOOKUP(G$5,PF!D:Q,10,0),IFERROR(VLOOKUP(G$5,SA!D:Q,10,0),IFERROR(VLOOKUP(G$5,SI!D:Q,10,0),IFERROR(VLOOKUP(G$5,MR!D:Q,10,0),IFERROR(VLOOKUP(G$5,FB!D:Q,10,0),"Could Not Be Found"
    ))))))

  4. #4
    Registered User
    Join Date
    06-07-2013
    Location
    Nairobi
    MS-Off Ver
    Excel 2007
    Posts
    3

    Re: Vlookup on multiple sheets

    Great formula. Mine are loooong ones.

  5. #5
    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
    52,969

    Re: Vlookup on multiple sheets

    Thanks. The indirect() function is ideal for this sort of thing

  6. #6
    Registered User
    Join Date
    06-07-2013
    Location
    Nairobi
    MS-Off Ver
    Excel 2007
    Posts
    3

    Re: Vlookup on multiple sheets

    And what would be the best alternative for an indirect function between two workbooks? I have been using the code below but it is slow.

    Please Login or Register  to view this content.
    Last edited by vlady; 06-10-2013 at 02:46 AM.

  7. #7
    Forum Contributor
    Join Date
    06-07-2013
    Location
    Pakistan
    MS-Off Ver
    Excel 2013
    Posts
    167

    Re: Vlookup on multiple sheets

    Dear Savannaexcel,
    Thank you very much. your formulae worked.but only for 7 sheets
    my 50% problem solved.
    Last edited by roofi; 06-07-2013 at 07:35 AM.
    Abdul Rouf Roofi

  8. #8
    Forum Contributor
    Join Date
    06-07-2013
    Location
    Pakistan
    MS-Off Ver
    Excel 2013
    Posts
    167

    Re: Vlookup on multiple sheets

    Dear FDibbins,
    yours is Great it really works............Thanks a lot, and thanks for explaining syntax.
    100% solved
    Last edited by roofi; 06-10-2013 at 02:39 AM.

  9. #9
    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
    52,969

    Re: Vlookup on multiple sheets

    savanna, please use code tags when posting VBA (see my note 1 below).

    Also, indirect() doesnt work between workbooks/files unless bot are open, you need an add-in for that (more_func i think its called)

    roofi, the indirect() function is a means of taking text, and converting into something that excel can use as a range. So...
    =VLOOKUP(G$5,INDIRECT(LEFT(G5,2)&"!D2:Q10"),2,0)
    is taking the left 2 characters of the contents of G5 (FB or MR etc), and then combing that with your range D2:Q10 to give you the sheetname and cell range FB!D2:Q10. You can add as many sheets as you want, as long as you keep to 2 characters for the name. If you want to use more, then you can change the
    LEFT(G5,2)
    to LEFT(G5,search("=",G5,1)-1)
    That will allow for more than 2 characters

  10. #10
    Forum Contributor
    Join Date
    06-07-2013
    Location
    Pakistan
    MS-Off Ver
    Excel 2013
    Posts
    167

    Re: Vlookup on multiple sheets

    Dear FDibbins,
    yours is Great it really works............Thanks a lot, and thanks for explaining syntax.
    100% solved

+ 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