+ Reply to Thread
Results 1 to 2 of 2

Autofilter Select and Copy Results multiple times to new sheet

  1. #1
    Registered User
    Join Date
    10-20-2016
    Location
    WA, US
    MS-Off Ver
    2013
    Posts
    1

    Autofilter Select and Copy Results multiple times to new sheet

    Hi,

    Fairly new to VBA. Been teaching it to myself the last few days. I've learned a ton, but now I feel like I'm stuck and need some help getting past this point.

    So basically I am given an excel file with "blocks" of similar data, that is stacked vertically. I would like to be able to autofilter the data by some terms to pull out specific "blocks" of data, and paste them into a new sheet, but stack the "blocks" horizontally instead of vertically.

    The attachment has the two sheets I'm working with. Element Forces - Frames is the input sheet. And Output is the output sheet. The cell borders can be ignored. I put those in there to make the "blocks" more visible to understand.

    Here is what I have written so far.

    So I would like it to run the first time, create the sheet "Output" if not already created. Copy the autofilter results. Find the last column containing data in "Output" and go to the next column and paste the results. Then I can run the script again with new autofilter terms, and it will take those results and paste them next to the first block of results. I'm mainly having issues with finding the last column containing data in the "Output" sheet using the .End(xlToLeft).Column+1. It's not ending up where I expect it to.

    And I'm sure there is a much simpler/elegant way to do this, but I am just learning (first taste of vba ever was 1 week ago) so this has been the best I've been able to some up with so far.

    Any help is very much appreciated.

    *Edit - One thing I forgot to mention, is that not all the "blocks" are the same size. Which is why I used the UsedRange and not just a range of cells.

    Please Login or Register  to view this content.
    Attached Files Attached Files
    Last edited by skyliner33v; 10-24-2016 at 03:26 PM.

  2. #2
    Forum Expert
    Join Date
    08-16-2015
    Location
    Antwerpen, Belgium
    MS-Off Ver
    2007-2016
    Posts
    2,380

    Re: Autofilter Select and Copy Results multiple times to new sheet

    Run this after filter

    Please Login or Register  to view this content.
    Kind regards
    Leo

+ 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. [SOLVED] Copy range multiple times in other sheet
    By Groovicles in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 09-20-2016, 04:05 PM
  2. Copy a column in new sheet multiple times
    By bm27 in forum Excel Programming / VBA / Macros
    Replies: 6
    Last Post: 03-12-2016, 08:06 PM
  3. Replies: 2
    Last Post: 01-23-2016, 01:16 PM
  4. [SOLVED] VBA help needed to AutoFilter with multiple criteria and copy to appropriate sheet
    By krjoshi in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 03-18-2014, 11:43 AM
  5. VBA code to Copy entire row to new sheet multiple times
    By wazimu13 in forum Excel Programming / VBA / Macros
    Replies: 17
    Last Post: 05-12-2013, 09:10 AM
  6. Using VBA to autofilter and paste over results - can't select only filtered rows.
    By Cornwell in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 01-14-2010, 11:33 AM
  7. Automate Autofilter Results - Copy to New Sheet
    By Annie in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 11-04-2005, 07:10 PM

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