+ Reply to Thread
Results 1 to 5 of 5

Using Cell references in file paths for formulas to create dynamic formulas

  1. #1
    Registered User
    Join Date
    11-27-2013
    Location
    TN USA
    MS-Off Ver
    Excel 2010
    Posts
    2

    Using Cell references in file paths for formulas to create dynamic formulas

    I am facing some ridiculous deadlines on a few major projects and really need some help here. I am using a lot of linked reports that have to be rewritten each month. For example smaller formulas look like this:

    =('S:\PUBLIC\Production\Job Cards\MOLDING\2013\11 November\[440A SIDE SPOILER JOB CARD.xls]Production Parts'!B$228*2)+'S:\PUBLIC\Production\Job Cards\MOLDING\2013\11 November\[440A SIDE SPOILER JOB CARD.xls]Production Parts'!B$262+'S:\PUBLIC\Production\Job Cards\MOLDING\2013\11 November\[440A SIDE SPOILER JOB CARD.xls]Production Parts'!B$292

    What I want to do is extract the file path from the above formula and make it a composite of several cell references.

    So what I need is to have a cell where they can change the month and another where we can change the year. So I set up several named cells that look like this:

    _MONTH =11 November
    _YEAR =2013
    _JOBCARD ='S:\PUBLIC\Production\Job Cards\MOLDING\
    _PATH =_JOBCARD & _YEAR &"\" &_MONTH

    I tried several versions, I am hoping for something like this:

    =('_PATH &"\[440A SIDE SPOILER JOB CARD.xls]"Production Parts'!B$228*2)+'_PATH &"\[440A SIDE SPOILER JOB CARD.xls]"Production Parts'!B$262+'_PATH &"\[440A SIDE SPOILER JOB CARD.xls]"Production Parts'!B$292

    Thanks ahead of time for any help.

  2. #2
    Valued Forum Contributor ratcat's Avatar
    Join Date
    03-07-2008
    Location
    Rural NSW, Australia
    MS-Off Ver
    Vista 2007
    Posts
    1,111

    Re: Using Cell references in file paths for formulas to create dynamic formulas

    G'day and welcome,

    Try adding the Indirect function into your formula.

    Indirect Function Tutorial
    Have I made you happy ??? If yes, please make me happy by pressing the http://www.excelforum.com/images/buttons/reputation-40b.png Add Reputation button in my post.
    Please don't forget to do the same to other contributors of this forum.

    Thanks
    I don't void confusion, I create it

  3. #3
    Registered User
    Join Date
    11-27-2013
    Location
    TN USA
    MS-Off Ver
    Excel 2010
    Posts
    2

    Re: Using Cell references in file paths for formulas to create dynamic formulas

    I have looked at that formula, however it has two problems from my point of view... The workbooks referred too have to be open, and any work around that requires files to be downloaded and installed which is a major hassle around here. Looking for either something I can use without add-inns or a VBA solution...

    If I have to install some plug ins I will, but really a last resort... Also has anybody created a file using the plug-ins and then opened the file on a system without the plug-ins? Do they still work? (I would guess not) So I would have to have that plug-in installed on every system here, another monumental headache.

    Thanks again folks, hope there are other solutions out there...

  4. #4
    Forum Guru Jonmo1's Avatar
    Join Date
    03-08-2013
    Location
    Bryan, TX
    MS-Off Ver
    Excel 2010
    Posts
    9,763

    Re: Using Cell references in file paths for formulas to create dynamic formulas

    Yep, indirect requires the source book to be open.

    You can use the Morefunc Addin that will do the same thing as indirect, but will work on a closed book.

    But YES, any pc you open the book on would require the addin to be installed.

  5. #5
    Forum Guru martindwilson's Avatar
    Join Date
    06-23-2007
    Location
    London,England
    MS-Off Ver
    office 97 ,2007
    Posts
    19,320

    Re: Using Cell references in file paths for formulas to create dynamic formulas

    you can use harlan groves pull() function it works ok in excel 2007 (i just tested it) so should probably work in 2010
    http://numbermonger.com/2012/02/11/e...sed-workbooks/
    ok its vba but that can be put in the workbook and stays with it if you email it to some one else no need to embed an add in
    "Unless otherwise stated all my comments are directed at OP"

    Mojito connoisseur and now happily retired
    where does code go ?
    look here
    how to insert code

    how to enter array formula

    why use -- in sumproduct
    recommended reading
    wiki Mojito

    how to say no convincingly

    most important thing you need
    Martin Wilson: SPV
    and RSMBC

+ 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] Dynamic references and changing formulas frustration
    By Sim_Tron in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 11-20-2013, 09:43 AM
  2. formulas with dynamic references to cells
    By excelnerd1 in forum Excel Formulas & Functions
    Replies: 7
    Last Post: 02-06-2009, 06:44 PM
  3. Dynamic cell references in formulas
    By Hurricane8 in forum Excel General
    Replies: 4
    Last Post: 07-17-2008, 06:30 PM
  4. Replies: 0
    Last Post: 08-18-2005, 12:05 PM
  5. dynamic cell references in formulas
    By CarolM in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 02-24-2005, 04:06 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