+ Reply to Thread
Results 1 to 7 of 7

VBA code to import data from multiple worksheets in the same file

  1. #1
    Registered User
    Join Date
    05-09-2012
    Location
    Florida
    MS-Off Ver
    Excel 2007
    Posts
    9

    VBA code to import data from multiple worksheets in the same file

    My department runs a daily report that all save in the same file. The reports are the exact format everyday and all data is in the same cells on each worksheet.

    What I am looking for is a VBA code that would allow me to quickly import specific data from each worksheet onto another worksheet. I would like the code to be able to reference a list of file names located in a column.

    For example:

    names of the files located in - range A1:A100
    of worksheet - DataCollector.xlsm
    files located in - C:\Users\Reports
    import data from cells - A10, B15, C20
    into cells - D2, E2, F2
    on DataCollector.xlsm

    Sorry if this formatting is ridiculous. I have found many examples online that are close to what I need but I have not been able to successfully alter them yet.

    If I could get a code that makes those exact parameters work, then I would be able to save the day at work.

  2. #2
    Forum Expert mike7952's Avatar
    Join Date
    12-17-2011
    Location
    Florida
    MS-Off Ver
    Excel 2007, Excel 2016
    Posts
    3,520

    Re: VBA code to import data from multiple worksheets in the same file

    Do you have sample workbooks with your expected results, and a sample of the workbook your wanting to import?
    Thanks,
    Mike

    If you are satisfied with the solution(s) provided, please mark your thread as Solved.
    Select Thread Tools-> Mark thread as Solved.

  3. #3
    Registered User
    Join Date
    05-09-2012
    Location
    Florida
    MS-Off Ver
    Excel 2007
    Posts
    9

    Re: VBA code to import data from multiple worksheets in the same file

    I believe these worksheets should represent the problem well.

    In the Worksheet DataCollector, I have described the problem and the only solution that I have been able to come up with.

    Thank you for your time.
    Attached Files Attached Files

  4. #4
    Forum Expert nilem's Avatar
    Join Date
    10-22-2011
    Location
    Ufa, Russia
    MS-Off Ver
    2013
    Posts
    3,377

    Re: VBA code to import data from multiple worksheets in the same file

    Hi WHATSXL,
    maybe so
    Please Login or Register  to view this content.

  5. #5
    Forum Expert mike7952's Avatar
    Join Date
    12-17-2011
    Location
    Florida
    MS-Off Ver
    Excel 2007, Excel 2016
    Posts
    3,520

    Re: VBA code to import data from multiple worksheets in the same file

    give this a try

    Please Login or Register  to view this content.

  6. #6
    Registered User
    Join Date
    05-09-2012
    Location
    Florida
    MS-Off Ver
    Excel 2007
    Posts
    9

    Re: VBA code to import data from multiple worksheets in the same file

    Wow. Perfecto. Thank you very much sir.

  7. #7
    Registered User
    Join Date
    05-09-2012
    Location
    Florida
    MS-Off Ver
    Excel 2007
    Posts
    9

    Re: VBA code to import data from multiple worksheets in the same file

    Okay. quick clarification.

    I tried Nilem's solution and it worked. When I posted, Mike's was there.
    Haven't tried it yet, but Nilem's works nicely.
    Will play with Make's solution more but making thread as solved.
    Thanks guys. Very impressive forum here.

+ 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. Import data from multiple pages on a website to one file
    By a1b2c3d4e5f6g7 in forum Excel General
    Replies: 0
    Last Post: 06-19-2014, 04:44 PM
  2. Replies: 3
    Last Post: 11-27-2011, 03:10 AM
  3. [SOLVED] Import one column of data from multiple Excel worksheets
    By [email protected] in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 07-11-2006, 04:30 PM
  4. No answer yet... Data Import from Many Worksheets to on file...
    By M Imran Buhary in forum Excel General
    Replies: 2
    Last Post: 06-13-2006, 03:35 AM
  5. Amalgamate Several Worksheets into one file thru Data import
    By M Imran Buhary in forum Excel General
    Replies: 0
    Last Post: 05-28-2006, 06:35 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