+ Reply to Thread
Results 1 to 5 of 5

VLOOKUP with INDIRECT and Multiple Workbooks

  1. #1
    Registered User
    Join Date
    04-16-2013
    Location
    Canada
    MS-Off Ver
    Excel 2010
    Posts
    45

    VLOOKUP with INDIRECT and Multiple Workbooks

    Hey Everyone,

    I am curious if anyone can help me out with a problem.

    I want a formula to use a value in a cell, use that value to go to a different file, use the value for the sheet name (a single digit number), then use the same value with different math to vlookup the project number, then get the value beside it.

    So:

    Value in Cell J6 in Workbook A = Client Number and Job Number.

    Sheet Number in Workbook B = Client Number

    Value I want the vlookup to return is beside the job number.

    What I have so far is:

    =(INDIRECT("'[Test.xlsm]"&(ROUNDDOWN((J6/100),0))&"'!NeedVlookupCommandHere"))

    I'm not quite sure where the Vlookup would go, either before or in the middle of the formula. :/


    The Value of the Client Number is the Rounded down J6/100

    The Value of the Job Number is J6-100

    I know this seems all out of joint, however I have no idea how to continue.

    EDIT:

    Just realized I didn't put a range for the vlookup, I want $A$5:$B$10000 if possible.

    For the record, if I put A6 into the area where I want the Vlookup Command, I get a value from the desired sheet, however I have no idea how to match the value of J6-100 from that sheet, then pull the result beside it.

    Maybe this is on the right path?
    =VLOOKUP(((INDIRECT("'[Test.xlsm]"&((ROUNDDOWN((J6/100),0))&"'!"))(J6))-100)$A$5:$B$1000,2,0),””)
    Last edited by Dagoom; 03-11-2015 at 10:16 AM.

  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,929

    Re: Convoluted and Complicated Formula

    Thanks for the title change

    And just FYI, INDIRECT() only works on open workbooks
    Last edited by FDibbins; 03-10-2015 at 01:14 AM.
    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
    04-16-2013
    Location
    Canada
    MS-Off Ver
    Excel 2010
    Posts
    45

    Re: Convoluted and Complicated Formula

    I'm aware that it only works in opened workbooks, I have a macro that re-validates the information upon editing of the cells in question, so it pulls the correct data. I appreciate the warning though.

    Also, thanks for telling me about the forum rules, I will make sure I follow them carefully.

  4. #4
    Registered User
    Join Date
    04-16-2013
    Location
    Canada
    MS-Off Ver
    Excel 2010
    Posts
    45

    Re: Convoluted and Complicated Formula

    Anyone have any advice?

    Thanks in advance.

  5. #5
    Registered User
    Join Date
    04-16-2013
    Location
    Canada
    MS-Off Ver
    Excel 2010
    Posts
    45

    Re: VLOOKUP with INDIRECT and Multiple Workbooks

    For anyone who is interested, this worked for me.

    IFERROR(VLOOKUP(J5,INDIRECT("'[Test.xlsm]"&LEFT(J6,1)&"'!$A:$B"),2,0),"")

    I opted for the left command as it's shorter however you COULD use ROUNDDOWN in it's place.

+ 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. Simplifying A Long, Convoluted Formula
    By leafs4life22 in forum Excel General
    Replies: 1
    Last Post: 06-18-2014, 05:59 PM
  2. Reversing convoluted names (easier said than done!)
    By RobMerr in forum Excel General
    Replies: 2
    Last Post: 08-19-2013, 09:03 AM
  3. Complicated Formula Help
    By rcruff in forum Excel General
    Replies: 0
    Last Post: 04-27-2011, 06:26 PM
  4. Convoluted Excel Sum Formula Issues
    By sclost in forum Excel General
    Replies: 2
    Last Post: 02-28-2009, 02:01 PM
  5. [SOLVED] Complicated IF Formula
    By Luke in forum Excel Formulas & Functions
    Replies: 5
    Last Post: 11-08-2005, 10:20 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