+ Reply to Thread
Results 1 to 3 of 3

How can I create a macro for extracting data from multiple workbooks within a folder

  1. #1
    Registered User
    Join Date
    10-10-2013
    Location
    uk
    MS-Off Ver
    Excel 2013
    Posts
    25

    Question How can I create a macro for extracting data from multiple workbooks within a folder

    I have a number of workbooks in one folder. I want to extract data from a specific cell from each workbook and paste it into a table in a new workbook within the same folder.

    The cell containing the data has the same co-ordinates in each workbook.

    For e.g. if I have 5 workbooks and the data is in a1 in each workbook, I want to create the following table

    Workbook Data from cell A1
    ‘filename 1’ Data 1
    ‘filename 2’ Data 2
    ‘filename 3’ Data 3
    ‘filename 4’ Date 4
    ‘filename 5’ Data 5


    How can I accomplish this?

  2. #2
    Valued Forum Contributor
    Join Date
    10-26-2008
    Location
    Birmingham, UK
    MS-Off Ver
    All versions up to 2010
    Posts
    1,025

    Re: How can I create a macro for extracting data from multiple workbooks within a folder

    Hi
    You can use this formula for each workbook you want to copy from:
    =[WorkbookName1]SheetName!$A1$1
    =[WorkbookName2]SheetName!$A1$1
    =[WorkbookName3]SheetName!$A1$1
    =[WorkbookName4]SheetName!$A1$1
    =[WorkbookName5]SheetName!$A1$1
    The other workbooks do not need to be open.
    Hope this helps.
    Good luck.
    Tony

  3. #3
    Registered User
    Join Date
    10-10-2013
    Location
    uk
    MS-Off Ver
    Excel 2013
    Posts
    25

    Re: How can I create a macro for extracting data from multiple workbooks within a folder

    Thanks for that - I can definitely see this working. However, I dont see how this method would make any real difference compared to opening up each individual workbook, copying the data in A1 and then pasting into the table in the new workbook.

    I wanted to automate this formula. For example the macro would have detect how many workbooks there were in the folder, extract the info in cell A1 and paste it into the table in the new work book.

    I have about 100 workbooks in this folder and it would take forever to do this manually.

+ 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. Extracting data from multiple .xls files in folder and creating new workbook
    By haedyr in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 12-01-2013, 07:28 PM
  2. Looping through multiple files in a folder and extracting data from a specific tab
    By Bandicoot in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 07-05-2013, 05:24 PM
  3. [SOLVED] Excel macro to pull retrieve data from multiple workbooks in a folder
    By tech_frk in forum Excel Programming / VBA / Macros
    Replies: 39
    Last Post: 03-07-2013, 08:04 PM
  4. Extracting Data from Multiple Files in a Folder
    By endoskeleton in forum Excel Programming / VBA / Macros
    Replies: 11
    Last Post: 03-24-2011, 11:23 PM
  5. Extracting data from variable workbooks in a folder
    By Aussie_Striker in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 01-22-2007, 04:56 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