+ Reply to Thread
Results 1 to 3 of 3

Change formula file reference by changing value in cell

  1. #1
    jrick47
    Guest

    Change formula file reference by changing value in cell

    I have a workbook that has seven tabs for the days of the week and each sheet
    is identical except for the date in A1. I have a number of cells on each
    sheet that are linked to another workbook to pull inventory information from
    it. File name example Inventory MM-DD-YY.xls Right now, in order to update
    the sheet on a weekly basis, I use find and replace to search for all
    instances of last weekending date and replace it with the current weekending
    date. What can I do to simply enter the new weekending date in a cell and all
    the formulas will change automatically?

  2. #2
    Mark Lincoln
    Guest

    Re: Change formula file reference by changing value in cell

    If you're entering the week-ending date in each cell, you can enter it
    in one cell and have the others refer to the first cell.

    Say you have your week-ending date in cell A1 on a sheet called Data.
    Change that cell. All other cells on the same sheet that need to show
    the same date would have the formula:

    =A1

    All cells on other sheets needing to show that date would have the
    formula:

    =Data!A1

    So when you change A1 on the Data sheet, all the other week-ending
    dates change as well.


  3. #3
    Mark Lincoln
    Guest

    Re: Change formula file reference by changing value in cell

    I'm not sure just what is in your formulae. But since part if it is
    "Inventory xx-xx-xx.xls", where xx-xx-xx is the previous week ending
    date, I would try this:

    Format your master week ending date cell as Text (I'll assume it's A1),
    and enter your week ending date in the proper format. Say, 01-14-06 as
    an example.

    In each cell that needs the week ending date changed, modify the
    portion of the formula that names the inventory file from, say,
    "Inventory 01-07-06.xls" (or whatever it is) to this:

    "Inventory "&A1&".xls" (Note the space after the word "Inventory")

    The result would then be "Inventory 01-14-06.xls".

    You're keeping the parts of the file name that don't change and
    changing just the part that does.

    For that matter, you could put the entire file name in A1 and refer to
    that from the other cells, but entering just the date is easier and
    less prone to error.

    (By the way, I had posted an answer earlier before realizing that it
    was exactly NOT what you needed. So I deleted it but had no time to
    post again until just now.)

    Hope this helps.


+ 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