+ Reply to Thread
Results 1 to 6 of 6

Filter Copy and paste data in using VBA based on a criteria

  1. #1
    Registered User
    Join Date
    10-23-2014
    Location
    Fife
    MS-Off Ver
    M365
    Posts
    49

    Filter Copy and paste data in using VBA based on a criteria

    Hi All

    I have a transaction data which currently undergoes tedious manual filtering and cleaning before I use it for MI. I want to keep the raw data in a different sheet(Transactions-Data) and from there I want copy and paste it into a new sheet(Transactions) using VBA. As Part of the copying I want to the macro filter out unwanted rows based on criteria(highlighted in the attached). I've got a vba macro however I need help to tweak it to accommodate the criteria. Grateful if anyone can help me win this one. Thanks
    Attached Files Attached Files

  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,434

    Re: Filter Copy and paste data in using VBA based on a criteria

    This will filter the data and copy it to the Transactions sheet. Once it's there, you can loop through the columns and delete any blank columns.

    Please Login or Register  to view this content.
    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


  3. #3
    Registered User
    Join Date
    10-23-2014
    Location
    Fife
    MS-Off Ver
    M365
    Posts
    49

    Re: Filter Copy and paste data in using VBA based on a criteria

    TMS you've sorted me out big time!! Much appreciated. This exactly what I want. Bless you.

  4. #4
    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,434

    Re: Filter Copy and paste data in using VBA based on a criteria

    You're welcome. Thanks for the rep.

  5. #5
    Registered User
    Join Date
    10-23-2014
    Location
    Fife
    MS-Off Ver
    M365
    Posts
    49

    Re: Filter Copy and paste data in using VBA based on a criteria

    Hi TMS, Please is it possible to tweak the code to copy over just selected columns like say Columns A:B, D:C, F, I, V, & AE? I was tiding up the rec and realised I don't need a whole lot of data. Thanks

  6. #6
    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,434

    Re: Filter Copy and paste data in using VBA based on a criteria

    From a practical point of view, it's easier just to copy everything across and then delete columns, starting from the Right hand side.

+ 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. VBA to Insert Formulas, Filter Data, and Paste on tab based on criteria.
    By Mr.Bigz in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 04-23-2018, 09:39 PM
  2. [SOLVED] Vba code to filter and copy data based on criteria.
    By sapnawat in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 02-08-2018, 02:11 AM
  3. Filter, Copy, Paste in a new sheet and give heading based on criteria
    By saravanan1981 in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 10-12-2016, 09:54 AM
  4. filter data based on criteria and copy to another sheet
    By anbarasi_r in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 06-23-2015, 09:56 PM
  5. Filter copy paste data based on sheet name
    By kannan1847 in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 03-31-2015, 01:58 PM
  6. Excel VBA filter to criteria and copy data and paste to another workbook
    By aalvaro03 in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 11-19-2013, 07:33 PM
  7. Need VBA help to filter and copy data based on specific criteria
    By astrial in forum Excel Programming / VBA / Macros
    Replies: 7
    Last Post: 06-13-2013, 10:48 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