Results 1 to 5 of 5

Reference Range from Closed Workbooks

Threaded View

  1. #1
    Registered User
    Join Date
    08-12-2014
    Location
    Massachusetts
    MS-Off Ver
    2007
    Posts
    3

    Reference Range from Closed Workbooks

    I have a workbook into which I want to aggregate data from many source workbooks (roughly 100 of them). Each month, these 100 workbooks will be updated, and I need my workbook to incorporate these changes without manually opening all 100 to update the data in my workbook. I have tried using regular linked formulas, but this results in #Refs when the source workbooks are changed or saved over.

    I need a way to access the data from these workbooks without having to open each one when I want to update. Here is what I have for code so far, and I have attached an Excel file that illustrates what I am aiming to achieve.

    Sub RefreshSourceData()
        Dim sourceFile As String, fileName As String, path As String
        path = "U:\Info\Meeting Materials\Strategy Files\"
        fileName = "[" & ActiveCell.EntireRow.Cells(1, 1).Value & ".xls]"
        sourceFile = "='" & path & fileName
        Range("B" & ActiveCell.Row).Formula = sourceFile & "Summary'!$F$2"
        Range("C" & ActiveCell.Row).Formula = sourceFile & "Summary'!$F$3"
        Range("D" & ActiveCell.Row).Formula = sourceFile & "Summary'!$B$10"
        Range("E" & ActiveCell.Row).Formula = sourceFile & "Summary'!$D$10"
        Range("F" & ActiveCell.Row).Formula = SomeWorkbookVariable(Don't know how to create this.).StdDev("Tab within workbook referenced first cell of row")
    End Sub
    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. Copy selected range to closed workbooks using VBA
    By olives in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 05-12-2013, 02:04 PM
  2. Copy a range from closed workbooks (ADO)
    By guitar187 in forum Excel Programming / VBA / Macros
    Replies: 6
    Last Post: 09-21-2010, 05:15 AM
  3. Copy a range from closed workbooks (ADO)
    By guitar187 in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 09-20-2010, 12:14 PM
  4. [SOLVED] Copy a range from closed workbooks (ADO)
    By nc in forum Excel General
    Replies: 3
    Last Post: 10-17-2005, 01:05 PM
  5. I want to reference closed workbooks with combo boxes
    By Akira5284 in forum Excel General
    Replies: 1
    Last Post: 06-02-2005, 03:05 PM

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