+ Reply to Thread
Results 1 to 3 of 3

Formulas creating workbook references

  1. #1
    Registered User
    Join Date
    10-09-2008
    Location
    Raleigh, NC
    Posts
    2

    Formulas creating workbook references

    Hiya! Thought I'd post this here instead of banging my head against the wall for the next few hours.

    Okay, I have budget spreadsheets I've created to span 2 week time frames for myself. They're named for their 2 week periods, i.e. "10-10 to 10-23.xlsx". I have a template file I just use for each new period.

    What I'm trying to do is have each one have a cell that returns an amount from a cell from the spreadsheet of the last 2 week period. At first, I made a formula to create the name of the last period's filename in a cell. My earlier versions landed me with serial numbers. I ended up with this:

    Please Login or Register  to view this content.
    The daily expenses worksheet consists of the dates of each day in the 2 week period. So, the formula above just takes the first and last dates, subtracts 14, and adds a .xlsx to it. Now, I want to take that and use it to reference cell H39 in the Daily Expenses worksheet of that workbook.

    Maybe I was just going about it the wrong way. I tried the most obvious way and failed:

    Please Login or Register  to view this content.
    I can get the file path right with this:

    Please Login or Register  to view this content.
    But then doing a workbook reference with it just...doesn't like it. I tried defining a formula with the first quoted formula. The end result was missing the day in the filename.

    Is there a way to do this? I just tried guessing at it. UGH! I think I'm coming to the conclusion that you can't use formulas to derive where the workbook reference is. Maybe I'm missing something.
    Last edited by raz1337; 10-09-2008 at 07:18 PM. Reason: Fixing up

  2. #2
    Valued Forum Contributor
    Join Date
    08-26-2008
    Location
    singapore
    Posts
    626
    You need to learn indirect() first
    Please Login or Register  to view this content.
    I need your support to add reputations if my solution works.


  3. #3
    Registered User
    Join Date
    10-09-2008
    Location
    Raleigh, NC
    Posts
    2
    I looked up Indirect() and it says that if it references another workbook, then that workbook has to be open. It returns a #REF error.

+ 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. Copy worksheets to new workbook
    By Edward HS in forum Excel Programming / VBA / Macros
    Replies: 9
    Last Post: 05-29-2008, 07:16 PM
  2. Run macro in workbook B from a macro in Workbook A
    By Wizz in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 05-28-2008, 08:41 AM
  3. Programmatically Searching Formulas for Sheet References
    By Baard in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 09-28-2007, 09:54 PM
  4. Creating a copy of the workbook and changing some cells contents
    By mlcfexcel in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 09-20-2007, 09:19 AM
  5. linking to open workbook
    By Mile029 in forum Excel General
    Replies: 1
    Last Post: 05-15-2007, 06:46 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