+ Reply to Thread
Results 1 to 8 of 8

indirect nested in vlookup to reference a variable sheet name in a separate workbook

  1. #1
    Registered User
    Join Date
    02-17-2017
    Location
    california usa
    MS-Off Ver
    mac 2011
    Posts
    4

    indirect nested in vlookup to reference a variable sheet name in a separate workbook

    I am a chef. Using excel-mac 2011.

    The 3 work books I have are:
    MASTER INVENTORY ... all purchased items with relevant data. Ending with the price per OZ. of all ingredients.

    MASTER RECIPE. All recipes for the establishment. I use vlookup to get the price per oz from the master inventory book.. works great. Also have nested indirect to look up any sub-recipes used.
    *****IF(D6=0,0,IFERROR(VLOOKUP(A6,'Mac:Users:chef:Downloads:[master inventory.xlsm]Sheet1'!$B$3:$I$673,8,FALSE),IFERROR(VLOOKUP("PRICE PER OZ.",(INDIRECT("'"&$D6&"'!D35:H41")),4,FALSE),"ingredient issue")))***** D6 is the name of another recipe in the book. IE: roasted garlic in caesar dressing

    PLATE COST. same vlookup to find the raw ingredient cost from the master inventory however can not get the nested indirect to work because it is in a separate workbook that is open. Trying to make it find the recipe name that is a sheet in the recipe book. I have flipped a few things around to test it out but can't seem to get it right... think I need to make a separate sheet in the master inventory workbook that is a summary of the recipes... but am trying to avoid extra data input.

    example:

    Caesar Salad plate cost:

    Caesar dressing--house made item. can't get the price per oz from the recipe. The recipe is a worksheet in the master recipe book.
    romain lettuce--purchased item. VLookup works fine
    coutons--purchased item. VLookup works fine

  2. #2
    Forum Guru
    Join Date
    08-28-2014
    Location
    USA
    MS-Off Ver
    Excel 2019
    Posts
    17,557

    Re: indirect nested in vlookup to reference a variable sheet name in a separate workbook

    Welcome to Excel Forum.
    If I understand then my proposed solution would be to use INDEX/MATCH instead of VLOOKUP as in:
    Formula: copy to clipboard
    Please Login or Register  to view this content.
    If this doesn't help then it would help us to help you if you would upload a sample of your workbooks by clicking on GO ADVANCED button below the Quick Reply window and then scrolling down to Manage Attachments to open the upload window.
    Let us know if you have any questions.
    Consider taking the time to add to the reputation of everybody that has taken the time to respond to your query.

  3. #3
    Registered User
    Join Date
    02-17-2017
    Location
    california usa
    MS-Off Ver
    mac 2011
    Posts
    4

    Re: indirect nested in vlookup to reference a variable sheet name in a separate workbook

    JeteMc,

    Thanks for the welcome and the suggestion. I will look at the suggested workaround as well as upload a couple sample workbooks with the caesar salad example tomorrow.

  4. #4
    Registered User
    Join Date
    02-17-2017
    Location
    california usa
    MS-Off Ver
    mac 2011
    Posts
    4

    Re: indirect nested in vlookup to reference a variable sheet name in a separate workbook

    see uploads
    Attached Files Attached Files

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

    Re: indirect nested in vlookup to reference a variable sheet name in a separate workbook

    Try

    =IF(B8=0,0,IFERROR(VLOOKUP(A8,'[master inventory.xlsm]Sheet1'!$B$3:$I$646,8,FALSE),IFERROR(VLOOKUP("PRICE PER OZ.",INDIRECT("'[master recipes.xlsm]" & B8 &"'!$D$35:$G$41"),4,FALSE),"ingredient issue")))

  6. #6
    Registered User
    Join Date
    02-17-2017
    Location
    california usa
    MS-Off Ver
    mac 2011
    Posts
    4

    Re: indirect nested in vlookup to reference a variable sheet name in a separate workbook

    works great! thanks.. great solution!

  7. #7
    Forum Expert Tony Valko's Avatar
    Join Date
    12-31-2011
    Location
    Pittsburgh
    MS-Off Ver
    2002, 2007:2013
    Posts
    18,890

    Re: indirect nested in vlookup to reference a variable sheet name in a separate workbook

    If that takes care of your original question, please select Thread Tools from the menu link above and mark this thread as SOLVED. Thanks.
    Biff
    Microsoft MVP Excel
    Keep It Simple Stupid

    Let's Go Pens. We Want The Cup.

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

    Re: indirect nested in vlookup to reference a variable sheet name in a separate workbook

    If that takes care of your original question, please select Thread Tools from the menu link above and mark this thread as SOLVED. Thanks.

    ....beaten to the punch!

+ 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 or INDEX-MATCH + INDIRECT with Nested IF/OR Statement
    By djmyers in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 06-11-2015, 10:40 PM
  2. Needing Vlookup formula with INDIRECT and Sheet Reference as criteria
    By colangus7 in forum Excel Programming / VBA / Macros
    Replies: 8
    Last Post: 11-06-2014, 10:42 PM
  3. vlookup on a different workbook with a variable sheet name
    By cwchan220 in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 05-28-2014, 10:04 AM
  4. INDEX function with nested INDIRECT reference
    By jharris63 in forum Excel Formulas & Functions
    Replies: 0
    Last Post: 03-13-2013, 11:26 AM
  5. vlookup with variable workbook and sheet
    By nzeg in forum Excel General
    Replies: 4
    Last Post: 08-10-2009, 04:06 AM
  6. VLookup - creating a variable Sheet reference?
    By futbol1097 in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 06-26-2007, 01:57 PM
  7. Using VLOOKUP with a nested INDIRECT function
    By nsinha76 in forum Excel Formulas & Functions
    Replies: 0
    Last Post: 04-21-2005, 05:15 PM

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