+ Reply to Thread
Results 1 to 5 of 5

Macro to pull data from 3 other worksheets, plus filtering help

  1. #1
    Registered User
    Join Date
    12-13-2013
    Location
    Stephens City, VA
    MS-Off Ver
    Excel 2010
    Posts
    24

    Question Macro to pull data from 3 other worksheets, plus filtering help

    Hi. This is my first time posting in an excel forum. I've been searching for help on my macro/vba problem but have had little to no luck. What I want to do is pull data from columns A,B,C,D in 3 other closed workbooks (export.csv, export1.csv, & export2.csv) to my main workbook (Thunder.xlsm)and append that data in columns A-D on my main workbook. In addition I created a list of 10 names (but need to expand or delete from this list as personnel change) in Column O that I would like to filter the data in A-D. The names in the list must find the data I want to keep in column D, the rest I want to delete (not the entire row, just A-D for that particular row that does not match the criteria in column O, and shift those cells up). I hope I explained that well enough.

    I've attached a sample spreadsheet that will hopefully help clarify what I am asking. I'm preferrably asking for 2 macro's, one for the pull of data, and the other for the filtering.

    Appreciate the help!

    Tim
    Attached Files Attached Files

  2. #2
    Forum Expert p24leclerc's Avatar
    Join Date
    07-05-2010
    Location
    Québec
    MS-Off Ver
    Excel 2021
    Posts
    2,081

    Re: Macro to pull data from 3 other worksheets, plus filtering help

    Here is a macro that will answer your second request to delete names not in your column O.
    Please Login or Register  to view this content.
    Pierre Leclerc
    _______________________________________________________

    If you like the help you got,
    Click on the STAR "Add reputation" icon at the bottom.

  3. #3
    Registered User
    Join Date
    12-13-2013
    Location
    Stephens City, VA
    MS-Off Ver
    Excel 2010
    Posts
    24

    Re: Macro to pull data from 3 other worksheets, plus filtering help

    Thanks P24,

    I've been trying to learn VBA on my own while playing in Excel. I'll give this a shot and let you know how it worked out for me.

    Tim

  4. #4
    Forum Expert p24leclerc's Avatar
    Join Date
    07-05-2010
    Location
    Québec
    MS-Off Ver
    Excel 2021
    Posts
    2,081

    Re: Macro to pull data from 3 other worksheets, plus filtering help

    Here is a macro that will answer your first request to upload data from the 3 files into Thunder.xlsm
    I assumed the 3 csv files will be located in the same folder as Thunder.xlsm. If they are not, you'll have to change the p_ath variable to look at the proper place.

    Please Login or Register  to view this content.

  5. #5
    Forum Expert
    Join Date
    03-28-2012
    Location
    TBA
    MS-Off Ver
    Office 365
    Posts
    12,454

    Re: Macro to pull data from 3 other worksheets, plus filtering help

    Thunderer,
    The code does the same for part 2 of your question, but instead of deleting and shiting the cells, it copies the 4 columns only. You can extend column O as you wish.
    Attached Files Attached Files

+ 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. MACRO to Pull Data from multiple worksheets onto a summary sheet based on an ID
    By eswonson in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 12-04-2013, 03:31 PM
  2. [SOLVED] Help with creating a macro to anaylse and pull data from multiple worksheets
    By eoghanmolloy in forum Excel Programming / VBA / Macros
    Replies: 9
    Last Post: 11-29-2012, 02:31 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