+ Reply to Thread
Results 1 to 7 of 7

Connect data from hundreds of closed workbooks to one workbook

  1. #1
    Registered User
    Join Date
    03-04-2014
    Location
    Rio de Janeiro, Brazil
    MS-Off Ver
    Excel 2010
    Posts
    13

    Connect data from hundreds of closed workbooks to one workbook

    Dear Scientists,

    I have a simple problem but I really can't find an elegant solution (not ctrl + c and ctrl v).

    Workbook "2014 Sales.xlsx" must have 12 worksheets, one per month, which one must have 31 columns that gets data from workbooks 2014 01 01.xlsx; 2014 01 02.xlsx; 2014 01 03.xlsx;... and so on, as externals links. And I must say that, I can NOT work with 31 different workbooks all open at the same time!

    I know that, there is no way to make INDIRECT (....) read from closed workbooks. Period.

    Is there a simple way to make that work? Maybe by using =vlookup(....)...

    I did a small example, but it gives you an idea.

    Thanks and keep it easy, literally. 2014 01 01.xlsx2014 01 02.xlsx2014 01 03.xlsx2014 Sales.xlsx
    Last edited by rgmatos3; 03-04-2014 at 11:26 PM.

  2. #2
    Forum Expert p24leclerc's Avatar
    Join Date
    07-05-2010
    Location
    Québec
    MS-Off Ver
    Excel 2021
    Posts
    2,081

    Re: Connect data from hundreds of closed workbooks to one workbook

    What about the 2 sheets you have in each day worrkbook? You probably want the sum of every sheets for one specific shop. Don't you?
    Why don't you have all of this in only one workbook, even one sheet?
    Or at least have a full month in only one sheet adding columns like State and date to the actual Shop and Sales columns.
    Pierre Leclerc
    _______________________________________________________

    If you like the help you got,
    Click on the STAR "Add reputation" icon at the bottom.

  3. #3
    Registered User
    Join Date
    03-04-2014
    Location
    Rio de Janeiro, Brazil
    MS-Off Ver
    Excel 2010
    Posts
    13

    Re: Connect data from hundreds of closed workbooks to one workbook

    In reality I don't make the daily workbook. They come to me already done.

    They have something like 5 different worksheets. And I only need information from 2 of them. Something like 15 rows in one and 2 rows in the other sheet.

    The problem is that, I have to do all this from 2008 up to this day and to the future.

    I want something like:

    =SUMIF(INDIRECT("'[2014 01 "&TEXT(B$2;"00")&".xlsx]NY'!$A:$A");$A3;INDIRECT("'[2014 01 "&TEXT(B$2;"00")&".xlsx]NY'!$B:$B"))+SUMIF(INDIRECT("'[2014 01 "&TEXT(B$2;"00")&".xlsx]CA'!$A:$A");$A3;INDIRECT("'[2014 01 "&TEXT(B$2;"00")&".xlsx]CA'!$B:$B"))

    But this don't work with closed workbooks. That's the problem.

  4. #4
    Forum Expert p24leclerc's Avatar
    Join Date
    07-05-2010
    Location
    Québec
    MS-Off Ver
    Excel 2021
    Posts
    2,081

    Re: Connect data from hundreds of closed workbooks to one workbook

    this formula will update even if workbooks are closed. But It will take some time to do this.
    Change the actual path in the formula to your real workbooks' location.
    Please Login or Register  to view this content.

  5. #5
    Registered User
    Join Date
    03-04-2014
    Location
    Rio de Janeiro, Brazil
    MS-Off Ver
    Excel 2010
    Posts
    13

    Re: Connect data from hundreds of closed workbooks to one workbook



    Yes, It will take some time. I will have to change column by column.

    Anyway, I will keep lookink for another solutions. My deadline is thursday.

    Thanks.

  6. #6
    Forum Expert p24leclerc's Avatar
    Join Date
    07-05-2010
    Location
    Québec
    MS-Off Ver
    Excel 2021
    Posts
    2,081

    Re: Connect data from hundreds of closed workbooks to one workbook

    You may want to try this macro that will open every files and extract the sum of the shop sales from every tabs it contains.
    Look at the comments in the code for some specifics issues about this code.
    Please Login or Register  to view this content.
    Hope this will help.
    Attached Files Attached Files

  7. #7
    Registered User
    Join Date
    03-04-2014
    Location
    Rio de Janeiro, Brazil
    MS-Off Ver
    Excel 2010
    Posts
    13

    Re: Connect data from hundreds of closed workbooks to one workbook

    Pierre Leclerc,

    I'm sorry not to have answered before, but everything went just fine.
    Actually what saved me was a small adjustment of your formula with IFERROR and VLOOKUP.
    Many thanks for the help!
    Do not worry there will be other questions! :p
    Thanks again.

+ 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. vba vlookup updates current data's from closed workbook undefined name of workbooks
    By breadwinner in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 08-27-2013, 06:53 AM
  2. Import data from several closed workbooks to a single sheet in an open workbook
    By drewship in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 05-04-2013, 06:35 AM
  3. Extract data from closed workbooks and copy into new workbook
    By philaugust2004 in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 04-15-2013, 07:45 AM
  4. Copy Sheet from one Workbook to Multiple Closed Workbooks
    By sflexi in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 02-02-2013, 10:01 AM
  5. Copy Data to One Workbook From Multiple Closed Workbooks
    By Ben4481 in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 03-04-2010, 08:02 AM

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