Consulting

Results 1 to 5 of 5

Thread: Getting data from diferent files in same Folder

  1. #1

    Lightbulb Getting data from diferent files in same Folder

    Hi everyone,

    I'm startin' to use Vba's codes and I have a lot of question about it.

    One that I really need at this time is the following:

    I have one File that i'm using as a Database of the datas that I want do copy from all Workbooks in the same Folder.
    So, i want to get the range "D15:M20" in all files from a Directory that I choose and copy it to the file "Main.xls" (Database's file) and then close those "temporary" files without saving.

    I?ve already tryed a lot of Codes from this site, but i cant continue that.

    Can anyone help me?

    Tks!

  2. #2
    Moderator VBAX Guru Simon Lloyd's Avatar
    Joined
    Sep 2005
    Location
    UK
    Posts
    3,003
    Location
    Regards,
    Simon
    Please read this before cross posting!
    In the unlikely event you didn't get your answer here try Microsoft Office Discussion @ The Code Cage
    If I have seen further it is by standing on the shoulders of giants.
    Isaac Newton, Letter to Robert Hooke, February 5, 1675 English mathematician & physicist (1642 - 1727)

  3. #3
    Hi,

    I've already tried those examples you said but i didn't get any succes in customize it.
    For example. I chose the first one:
    Combine All Data From All Worksheets in All Workbooks in a Specified Directory
    but it takes all the datas from all worksheets in the file wich is in a specific folder. What I want is to get the datas from a specific Worksheet.

    Can anyone help me?

    Tks!

  4. #4
    VBAX Master
    Joined
    Jul 2006
    Location
    Belgium
    Posts
    1,286
    Location
    How many worksheets do you have in the workbooks that needs to be copied ? If more, what's the name of the sheet that you want this range from ?

    And how does those ranges must be placed in the destination sheet 'Main' ? Problably under each other.

  5. #5
    Administrator
    VP-Knowledge Base
    VBAX Grand Master mdmackillop's Avatar
    Joined
    May 2004
    Location
    Scotland
    Posts
    14,489
    Location
    Here's another one to try.
    MVP (Excel 2008-2010)

    Post a workbook with sample data and layout if you want a quicker solution.


    To help indent your macros try Smart Indent

    Please remember to mark threads 'Solved'

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •