+ Reply to Thread
Results 1 to 6 of 6

Multiple excel files and collating specific cell info

  1. #1
    Registered User
    Join Date
    09-20-2007
    Posts
    13

    Multiple excel files and collating specific cell info

    Hi,
    I have about 55 excel workbook templates (identical format; different info) from which I need to extract specific cells into a common worksheet to collate all the information. I have seen, in the past, a macro that lists the links to a specific cell in a number of workbooks saved in the same folder, once you have selected the folder where the workbooks are stored; Once the links are displayed you simply change the cell reference and copy/paste in the next column for all the others in same folder and hey presto you have the values for the same cell from all the templates. Has anyone come across this? Or help out in any way? Your help is very much appreciated
    Thanks

  2. #2
    Forum Contributor WinteE's Avatar
    Join Date
    04-07-2007
    Location
    Netherlands
    Posts
    544
    Hi,

    See the attached file. It will pick up all data in cell B2 of every file in the same workbook as the active workbook is in.

    Let me know if you have any questions about this.

    Succes,
    Erik
    Attached Files Attached Files
    Just keep it simple !


    http://www.excelguide.eu
    In English as well as in Dutch

  3. #3
    Forum Contributor
    Join Date
    08-10-2006
    Posts
    723
    hi ska.

    this code will need to be changed in the main code. put the path where all your workbookes are kepted.


    Please Login or Register  to view this content.
    change this part of the code ie f5 to where the data is you want to copy from
    i have used 4 cells on my example
    add more for the more cells you have to copy

    Please Login or Register  to view this content.
    Please Login or Register  to view this content.
    hope this works
    this file will have to be in a different location to all the other files

    steve
    Last edited by stevekirk; 10-16-2007 at 12:58 PM.

  4. #4
    Registered User
    Join Date
    09-20-2007
    Posts
    13
    Hi Steve thanks for the reply and code, but I should have said I am a newbie at this.
    I copied the code and then tried changin the file path but am unsure as to what code you speak of when you say:
    'DO YOUR CODE HERE
    Set rCell = wbCodeBook.Sheets(1).Range("A65536").End(xlUp).Offset(1, 0)

    'THIS PUT THE NAME OF THE WORKBOOKS YOU ARE GETTING YOUR DATA FROM INTO A1
    rCell.FormulaR1C1 = ActiveWorkbook.Name
    Do i have to change the range A65536 to the deired cell or is that a limit of some sort?
    For the 2nd portion do I have to enter the active workbook name of all the template files I am extracting data from or the destination workbook (which I am assuming has to be open when the macro is run?

    also does this macro only work if all the work books are open i.e. can it not extract the data from each cell from closed workbooks?

    Sorry for all the questions your help is much appreciated

  5. #5
    Registered User
    Join Date
    09-20-2007
    Posts
    13
    Quote Originally Posted by WinteE
    Hi,

    See the attached file. It will pick up all data in cell B2 of every file in the same workbook as the active workbook is in.

    Let me know if you have any questions about this.

    Succes,
    Erik
    Hi Erik
    Thanks for your efforts but I cant seem to get it to work? You also say it will pick up cell b2 of every file in the same work book but I need to extract cells from a given same worksheet in multiple workbooks which are all stored in the same folder. I cant seem to view the code for this macro either when I hit alt+f11?
    Thanks
    Khuram

  6. #6
    Forum Contributor WinteE's Avatar
    Join Date
    04-07-2007
    Location
    Netherlands
    Posts
    544
    Hi Khuram,

    In the code, which you'll find in the object 'ThisWorkbook', the following line has to be changed :

    Please Login or Register  to view this content.
    The part "Blad1" refers to the name of the sheet. "Blad1" is the Dutch version of the standard sheetname "Sheet1".

    Erik

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

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