+ Reply to Thread
Results 1 to 2 of 2

Automate Copy and Paste based on Filter?

  1. #1
    Registered User
    Join Date
    09-15-2011
    Location
    Wolverhampton, England
    MS-Off Ver
    Excel 2007
    Posts
    14

    Automate Copy and Paste based on Filter?

    I very much doubt this is possible, but having seen the quality of advice that is available here, I thought if anybody would know if it's possible it's you guys.

    Don't worry Bob, I'm not going to cross-post again - I've learnt from that mistake!

    So here's my quandary - I currently have a spreadsheet that has an input screen a formulas page and an output screen.

    There's literally thousands of formulas that determine what the output should be, and a list of about 300 items that may or may not have a positive value in the 'quantity' box based upon the input.

    I then have a macro that auto-filters the list of 300 items and only displays anything with a value in the quantity box or 1 or greater.

    At this point I currently copy the list and paste it into a 4th sheet - which is essentially a letter with room to paste the item list in.

    By default the 4th sheet has a 20 row grid to allow for input, however if there are more than 20 items listed on the output sheet then additional rows need to be inserted.

    I've put a formula on the 4th sheet that evaluates how many lines are on the filtered output sheet and instructs the user how many additional lines are require and then I have added buttons to insert 1, 5 and 10 additional rows into the grid to make things a little easier.

    The trouble is, even this simple procedure is too much for the users to do without messing it up - so I was wondering - is there a way to automate it so that it will evaluate how many rows are required and then insert that many rows - then copy the filtered output list and paste it into the grid on sheet 4.

    I hope that makes sense - if you require any additional information please let me know.

    Thanks in advance.

  2. #2
    Forum Guru TMS's Avatar
    Join Date
    07-15-2010
    Location
    The Great City of Manchester, NW England ;-)
    MS-Off Ver
    MSO 2007,2010,365
    Posts
    44,447

    Re: Automate Copy and Paste based on Filter?

    Please post a sample workbook.

    Personally, I think I'd approach this by building and executing an Advanced Filter with the output on Sheet 4. Then I'd work out how many rows of data there are and add the subtotals/totals at the bottom. However, that's entirely guesswork as there's nothing on which to base the theory ;-)


    Regards
    Trevor Shuttleworth - Retired Excel/VBA Consultant

    I dream of a better world where chickens can cross the road without having their motives questioned

    'Being unapologetic means never having to say you're sorry' John Cooper Clarke


+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

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