+ Reply to Thread
Results 1 to 6 of 6

Filtering Macro Issues

  1. #1
    Registered User
    Join Date
    08-12-2014
    Location
    Merseyside
    MS-Off Ver
    Office 2010
    Posts
    38

    Filtering Macro Issues

    I have the below macro which should filter my data then copy it into the next sheet. The problem is that when it is activated it only copies over the data headings in row E5 whereas I want it to filter A6:E6 and down.

    When i've changed the macro to E6 instead of E5 it takes E6 over even when it should be filtered out.

    The other problem is that when it runs for the first time and doesn't work I go back and run the macro again and it works perfectly.

    Any suggestions?

    HTML Code: 

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

    Re: Filtering Macro Issues

    I suspect that you need this:
    Please Login or Register  to view this content.
    before the filter and copy, as well as after it.


    Regards, TMS
    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
    08-12-2014
    Location
    Merseyside
    MS-Off Ver
    Office 2010
    Posts
    38

    Re: Filtering Macro Issues

    Thanks for your reply.

    Before and after which bits do I need to put that in?

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

    Re: Filtering Macro Issues

    This would be my guess:

    Please Login or Register  to view this content.

    I often struggle getting AutoFilter to work, so this is actually based on another recent thread I contributed to: http://www.excelforum.com/excel-prog...ng-column.html

    The basic idea is to ensure that AutoFilter is switched off before you try to filter as it can act as a "toggle". Hence the reason that it might fail and then run perfectly second time through.


    Regards, TMS

  5. #5
    Registered User
    Join Date
    08-12-2014
    Location
    Merseyside
    MS-Off Ver
    Office 2010
    Posts
    38

    Re: Filtering Macro Issues

    It works.

    Thanks so much

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

    Re: Filtering Macro Issues

    You're welcome.

+ 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. Filtering issues with a protected sheet
    By TPDave in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 05-19-2014, 12:31 PM
  2. [SOLVED] advanced filtering issues
    By derrickh13 in forum Excel Formulas & Functions
    Replies: 8
    Last Post: 02-15-2013, 03:09 PM
  3. Filtering Issues with Macro for Creating Pivot Table
    By Mathaholic14641 in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 06-22-2012, 09:59 AM
  4. filtering issues - help!
    By jw01 in forum Excel General
    Replies: 1
    Last Post: 04-03-2012, 09:57 AM
  5. Intense Filtering Issues...
    By jsarsfi2 in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 07-15-2010, 12:50 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