+ Reply to Thread
Results 1 to 2 of 2

Creating a Macro that Imports data from multiple workbooks into one Main workbook

  1. #1
    Registered User
    Join Date
    07-28-2013
    Location
    United States
    MS-Off Ver
    Excel 2007
    Posts
    1

    Question Creating a Macro that Imports data from multiple workbooks into one Main workbook

    I am new to creating macros. I have tried searching for existing macros to help with my current request; however I have not found a helpful one. Please let me know if you can assist.

    Contents

    1. 'Master Workbook.xlsm' contains:
    - 'Worksheet A': (A3:Last Line) is a list of names
    - 'Worksheet B': (A3:Last Line) is Blank and will be populated with the exported data from 'Supportingworkbook1' and 'Supportingworkbook2'
    2. 'Supportingworkbook1.xlsx'
    - Worksheet1: Contains data
    3. 'Supportingworkbook2.xlsx'
    - Worksheet1: Contains data

    Requesting Assistance: To Create a macro button that will “quickly run in the background” to import data from two workbooks into one main workbook.

    Using the data listed in 'Mastetrworkbook.xlsm', 'WorksheetA', [A3:Last Row, B3:Last Row, and C3:Last Row ], search and filter* through 'Supportingworkbook1.xlsx' (‘Worksheet1’), and 'Supportingworkbook2.xlsx', (‘Worksheet1’), [D46:Last Row, I46:Last Row, and J46:Last Row] for matches. *The filter must contain at least 1 of the 3 listed/provided data from ‘WorksheetA’ per each row.

    When Matches are found, copy and export the specified cells of data to the 'Mastetrworkbook.xlsm', ‘WorksheetB’.

    Example: When the name Michele Jackson is filtered and found in 'Supportingworkbook1.xlsx' at row D:589 AND/OR also filtered and found in 'Supportingworkbook2.xlsx', in row D:146. Copy the rows corresponding values from column D, Column I, Column J, and Columns L: “2nd to Last Column”. Paste the copied values into 'Mastetrworkbook.xlsm', 'WorksheetB', (Starting at A:3). Therefore it will look like this.

    Copy 'Supportingworkbook1.xlsx' Value from D:589 -> Paste into 'Mastetrworkbook.xlsm' Column C:3

    Copy 'Supportingworkbook1.xlsx' Value from Column I:589 -> Paste into 'Mastetrworkbook.xlsm' Column B:3

    Copy 'Supportingworkbook1.xlsx' Value from Column J:589 -> Paste into 'Mastetrworkbook.xlsm' Column A:3

    Copy 'Supportingworkbook1.xlsx' Value from Columns L:589 trough “2nd to Last Column”:589 -> Paste into 'Mastetrworkbook.xlsm' Columns E:3 through HB:3.

    Copy 'Supportingworkbook2.xlsx' Value from D:146 -> Paste into 'Mastetrworkbook.xlsm' Column C:3

    Copy 'Supportingworkbook2.xlsx' Value from Column I:146 -> Paste into 'Mastetrworkbook.xlsm' Column B:3

    Copy 'Supportingworkbook2.xlsx' Value from Column J:146 -> Paste into 'Mastetrworkbook.xlsm' Column A:3

    Copy 'Supportingworkbook2.xlsx' Value from Columns L:146 trough “2nd to Last Column”:146 -> Paste into 'Mastetrworkbook.xlsm' Columns E:3 through HB:3.

    Any and ALL help would be greatly appreciated. Thanks!!!
    Last edited by MacroHelp911; 07-28-2013 at 10:57 PM.

  2. #2
    Forum Contributor arlu1201's Avatar
    Join Date
    09-09-2011
    Location
    Bangalore, India
    MS-Off Ver
    Excel 2003 & 2007
    Posts
    19,166

    Re: Creating a Macro that Imports data from multiple workbooks into one Main workbook

    Do you have a sample file(s) that you can upload?

    To Attach a File:

    1. Click on Go Advanced
    2. In the frame Attach Files you will see the button Manage Attachments
    3. Click the button.
    4. A new window will open titled Manage Attachments - Excel Forum.
    5. Click the Browse... button to locate your file for uploading.
    6. This will open a new window File Upload.
    7. Once you have located the file to upload click the Open button. This window will close.
    8. You are now back in the Manage Attachments - Excel Forum window.
    9. Click the Upload button and wait until the file has uploaded.
    10. Close the window and then click Submit.
    If I have helped, Don't forget to add to my reputation (click on the star below the post)
    Don't forget to mark threads as "Solved" (Thread Tools->Mark thread as Solved)
    Use code tags when posting your VBA code: [code] Your code here [/code]

+ 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. Setting Up and Creating a Macro to copy data from multiple tabs onto one main tab
    By Carrie1990 in forum Excel Programming / VBA / Macros
    Replies: 10
    Last Post: 11-29-2012, 12:19 PM
  2. creating multiple sheet reports from main data source
    By Kolacube in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 03-03-2011, 10:22 AM
  3. Extracting data from multiple workbook in folder into main workbook
    By Julesdude in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 10-14-2010, 11:25 AM
  4. Macro that runs macro in another workbook and then imports the data
    By Trunks1986 in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 02-23-2010, 05:36 AM
  5. Importing data from several existing workbooks into main workbook
    By Incoherent in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 12-22-2005, 05:15 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