Results 1 to 6 of 6

Using filename as variable in external reference formula

Threaded View

  1. #1
    Registered User
    Join Date
    04-21-2016
    Location
    Minneapolis, Minnesota
    MS-Off Ver
    2016
    Posts
    26

    Using filename as variable in external reference formula

    I am trying to automate several time consuming tasks.
    I have ~25 worker logs used in new worker training.
    I have a summary sheet that gathers information from each of those logs.

    I currently have the log creation process automated, but I would like to automate the creation of the summary sheet as well.
    The log creation process runs several log creation macros in a "For i =1 to lastrowA1" loop.

    One of the variables derived from that loop is myfilenames(i). I want to use the myfilenames(i) variable in formulas, replacing the worker name so that I can run a macro to create the needed external references in the summary view and pull the table data from the individual worker's tables into a master table for analysis.


    Current code:
    ActiveCell.FormulaR1C1 = _
            "='[Case Review - Alison.xlsx]Stat Summary Aug-01 thru Sep-29'!R16C3"
    What I have tried so far (and doesn't work)
    ActiveCell.FormulaR1C1 = _
            "='[Case Review -  & myfilenames(i) & .xlsx]Stat Summary Aug-01 thru Sep-29'!R16C3"
    How can I make this type of formula work, where part of the filename is a variable?


    Attachments:
    Log creator (using module 7 as test module)
    Alison (example worker log)
    Ginny view (summary sheet)
    Attached Files Attached Files

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. [SOLVED] Using a variable in an external reference
    By pibe31 in forum Excel Formulas & Functions
    Replies: 4
    Last Post: 01-17-2016, 07:48 AM
  2. [SOLVED] How to reference a variable in a filename and table
    By D_N_L in forum Excel Programming / VBA / Macros
    Replies: 6
    Last Post: 02-13-2014, 07:03 AM
  3. Replies: 2
    Last Post: 06-19-2012, 12:48 PM
  4. External reference with variable filenames
    By donavank in forum Excel Formulas & Functions
    Replies: 0
    Last Post: 10-02-2008, 12:32 PM
  5. Variable External Reference:
    By fil in forum Excel General
    Replies: 2
    Last Post: 01-18-2008, 06:33 PM
  6. Variable Value to Replace Reference in Filename?
    By TC2 in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 02-20-2007, 06:02 PM
  7. External Reference - Filename Change
    By bg18461 in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 06-08-2006, 11:50 AM

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