+ Reply to Thread
Results 1 to 5 of 5

How to update all linked workbooks upon change

  1. #1
    Registered User
    Join Date
    07-12-2020
    Location
    NC, USA
    MS-Off Ver
    18.2005.1191.0
    Posts
    3

    How to update all linked workbooks upon change

    Hello all.

    I'm a chef at a restaurant in NC and I've been developing a workbook that contains a reference of all of the ingredients that I purchase with their pack size, unit cost, etc...
    I use this workbook as a reference for other workbooks that I build for specific recipes. The recipes reference the base sheet for price and pack size of ingredients so that when an ingredient's price changes, I don't have to redo all the calculations myself.

    The problem I run into is that the cells have to stay exactly where they are in order for them to remain properly linked -unless every linked workbook is open at the same time. In order to add new ingredients, I have to add them to rows at the bottom of the sheet, which becomes cumbersome as I cannot insert rows alphabetically without messing up all my referenced workbooks. I have 50+ recipes so far, so opening them all at once isn't really doable.

    Is there a way for me to insert rows and move data around while still having all of the files that reference it change too?



    Also, this is my first post and I hope it is in the right category and considered a "function" of Excel. Thanks

  2. #2
    Forum Moderator - RIP Richard Buttrey's Avatar
    Join Date
    01-14-2008
    Location
    Stockton Heath, Cheshire, UK
    MS-Off Ver
    Office 365, Excel for Windows 2010 & Excel for Mac
    Posts
    29,464

    Re: How to update all linked workbooks upon change

    Hi, and welcome to the forum.

    Without a macro you might consider using a VLOOKUP making sure the range you lookup would cover any additional rows you might add.
    Richard Buttrey

    RIP - d. 06/10/2022

    If any of the responses have helped then please consider rating them by clicking the small star icon below the post.

  3. #3
    Registered User
    Join Date
    07-12-2020
    Location
    NC, USA
    MS-Off Ver
    18.2005.1191.0
    Posts
    3

    Re: How to update all linked workbooks upon change

    Thank you for the suggestion! I think VLOOKUP will meet my needs but I'm having an issue working with it.

    I am getting the value "#REF!" after inputting the code.

    The goal is to lookup the UPC in Column 1 and then pull the name and other information associated with the column of the UPC.

    Here is my code.

    Please Login or Register  to view this content.
    So A5 is the UPC for the item listed in the Sample Recipe.
    'Base Inventory Sample.xlsm'!Table2[Column1] Is the spreadsheet and column to reference to find the UPC code.
    ",2," is the value in the second column that I want to pull. In this case, it should be the name "Butter"
    "FALSE" means that I only want to look for the exact value.

    Am I doing this right?

    I have attached a sample Base Inventory and a Sample Recipe for reference.

    To explain my sheets in a little more detail, I also have a macro running to record the date that the price of each ingredient was updated. It records this value a couple columns over on the same row as the ingredient. Furthermore, the Recipe references the Base Inventory for prices of ingredients and then once it has calculated the total cost of the recipe, that number is linked back to the Base Inventory sheet labeled "Prep" so that I have the cost of the prepped ingredients in the Inventory sheet as well.

    Let me know if you have any more questions. I really appreciate any and all help.
    These sheets have been my babies that I've worked on for the last year and getting this sorted would be so exciting for me!!



    EDIT:
    I found that if I change the lookup to the entire table, the VLOOKUP works correctly. Now, my problem is that my table will continue to grow as I add ingredients. How do I make sure that the table referenced will grow as well? Is there an End of List function or something that determines I just want to look at all the data in the table regardless of table size?

    Please Login or Register  to view this content.
    Attached Files Attached Files
    Last edited by waffleicious; 07-13-2020 at 12:24 PM.

  4. #4
    Forum Moderator - RIP Richard Buttrey's Avatar
    Join Date
    01-14-2008
    Location
    Stockton Heath, Cheshire, UK
    MS-Off Ver
    Office 365, Excel for Windows 2010 & Excel for Mac
    Posts
    29,464

    Re: How to update all linked workbooks upon change

    Hi,

    The Vlookup should be

    Please Login or Register  to view this content.
    As long as new items are added to the row immediately below the last row in the table, the Table name definition automatically expands to include new rows so you shouldn't have to worry about it.

    Personally I dislike tables since I find the structure of functions that use them less than intuitive. I always tend to work with Dynamic Named ranges which achieve the same sort of thing and which I find easier to read and understand.

  5. #5
    Registered User
    Join Date
    07-12-2020
    Location
    NC, USA
    MS-Off Ver
    18.2005.1191.0
    Posts
    3

    Re: How to update all linked workbooks upon change

    Thanks Richard I see that it does, indeed work that way!

    If I were to make this a Dynamic Named Range, how would I go about that?
    I found this formula to set the range of all items with a value in column a
    Please Login or Register  to view this content.
    But then how would I reference a value in column a and have it tell me the corresponding row values in columns B,C, etc...?

+ 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. [SOLVED] Macro to open linked workbooks, update references, then close out links
    By Elliott_the_noob in forum Excel Programming / VBA / Macros
    Replies: 6
    Last Post: 07-04-2018, 12:14 PM
  2. VBA that will automatically update master that has linked workbooks
    By hwishman in forum Excel Programming / VBA / Macros
    Replies: 15
    Last Post: 07-15-2014, 04:41 PM
  3. [SOLVED] Cells Linked Between Two Excel 2007 Workbooks Don't Automatically Update
    By zkeith in forum Excel Formulas & Functions
    Replies: 4
    Last Post: 06-25-2013, 12:43 AM
  4. Update values in fomulas in linked workbooks
    By gc4676 in forum Excel Formulas & Functions
    Replies: 0
    Last Post: 10-19-2012, 05:35 AM
  5. Update linked workbooks
    By timmycl_7 in forum Excel General
    Replies: 0
    Last Post: 09-16-2011, 10:28 AM
  6. Linked cells from separate workbooks won't update
    By yjbrody in forum Excel General
    Replies: 2
    Last Post: 11-03-2009, 05:12 PM
  7. Update values in Linked workbooks
    By sssomas in forum Excel General
    Replies: 2
    Last Post: 07-02-2008, 09:23 AM

Tags for this Thread

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