+ Reply to Thread
Results 1 to 4 of 4

Extracting data from closed workbooks

  1. #1
    Forum Contributor
    Join Date
    10-10-2006
    Location
    Birmingham UK
    MS-Off Ver
    Excel 2019, Win 10
    Posts
    102

    Extracting data from closed workbooks

    I have 12 workbooks, one for each month. I have a 13th workbook in which I wish to record selected data from each month (which is then totalled for the year).
    The monthly workbooks are all closed except the current working month. The problem I have is that in the 'yearly' workbook (when adding a new month) I must manually 'open' the new monthly workbook for each cell formula change or addition (about 30 times).
    This also has to be executed even if a monthly workbook is actually 'open' and in current use - the formula includes the path with all subdirectories and drive letter. For the closed workbooks, that's necessary, but for the open workbook?
    I seem to remember in the distant past, that there is a way around this (using 'Sumproduct'?) where once the formula is added no further action is required. The path is added when the monthly workbook is closed.
    The main problem is that the open and in use workbook data is not updated in the 'yearly' workbook. I have to go through the above 'opening' procedure each time but with the addition of altering a formula in each cell before I can 'open' an already 'open' workbook.
    Sorry for the lengthy description, but I do feel there must be an easier way to extract data from closed workbooks.

  2. #2
    Forum Expert dominicb's Avatar
    Join Date
    01-25-2005
    Location
    Lancashire, England
    MS-Off Ver
    MS Office 2000, 2003, 2007 & 2016 365
    Posts
    4,867

    Re: Extracting data from closed workbooks

    Good morning Zagra147

    This sounds like you don't want to extract data from a closed workbook, you want to use it in a calculation - these aren't the same thing.

    I assume you're trying to use SUMIF (or SUMIFS) formulae? These, unlike most of Excel's other formulae, do not work with closed workbooks. You are correct that you can use SUMPRODUCT on a closed workbook. If you want to go this way, you will need to provide examples of your current formulae as the syntax between SUMIFS and SUMPRODUCT are significantly different. SUMPRODUCT is also significantly slower than its SUMIFS counterpart, so this may not be the way forward, depending how many calculations are required, how big the ranges involved etc.

    An alternative is to extract the data from your 12 workbooks into a temporary sheet and do the calculations from the temporary sheet (which can be hidden).

    Have a think about what suits your purposes.

    HTH

    DominicB
    Please familiarise yourself with the rules before posting. You can find them here.

  3. #3
    Forum Contributor
    Join Date
    10-10-2006
    Location
    Birmingham UK
    MS-Off Ver
    Excel 2019, Win 10
    Posts
    102

    Re: Extracting data from closed workbooks

    I do not need to do any calculations in the yearly sheet. This is just for a collection of existing data. All the calculations have been carried out in the monthly sheets.
    In the yearly sheet I enter the path, the file name and the cell reference for a closed monthly sheet. Upon pressing 'enter', a screen pops up telling me to open the relevant sheet by clicking on the file name and then click 'OK'. This has to be done for every data cell in the yearly sheet.
    If I the open the sheet to display on the screen, the path does not disappear. It remains as part of the formula in the yearly sheet.

    However, If I start afresh with an already opened month sheet and just manually enter the file name and cell reference (no path) in the yearly sheet, it works fine. If I close the month sheet, the path appears. If I open the month sheet the path disappears. Which is as it should be.

    I've also found that if I try a 'Find and Replace' to change all the formulae to a different month, say, AUG to JAN, the the pop-up sheet appears for each cell change and the full path is added even if the month sheet is open. But if I manually alter each cell, then it is OK.

  4. #4
    Registered User
    Join Date
    08-10-2018
    Location
    PDX
    MS-Off Ver
    365
    Posts
    10

    Re: Extracting data from closed workbooks

    Have you tried the "get data/from file" from the data tab?
    load the data from a workbook, set the amount of time it pulls data from a workbook.
    it will pull selected cells data from a closed or open workbook and input it into a field on a data sheet.
    which you can then =cell to display the data wherever you'd like.
    hope thats no to confusing?

+ 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] Extracting Data from a closed workbook
    By dprobst in forum Excel Formulas & Functions
    Replies: 6
    Last Post: 10-19-2017, 01:34 PM
  2. Export data with two Criteria values from closed workbook to closed workbooks VBA
    By julielara in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 08-07-2016, 01:56 PM
  3. Extracting Data from Closed workbook
    By ueranda in forum Excel Programming / VBA / Macros
    Replies: 12
    Last Post: 07-23-2016, 10:27 AM
  4. extracting data from closed workbook
    By sark in forum Excel Programming / VBA / Macros
    Replies: 17
    Last Post: 11-20-2014, 01:18 AM
  5. Extracting data - vlookups with closed Sheets
    By Libster78 in forum Excel Programming / VBA / Macros
    Replies: 30
    Last Post: 03-16-2010, 12:02 PM
  6. Extracting Data - Open vs Closed
    By VBA Noob in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 06-14-2006, 04:09 PM
  7. [SOLVED] Extracting data from a closed workbook
    By Barb Reinhardt in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 02-07-2006, 10: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