+ Reply to Thread
Results 1 to 3 of 3

Adding filter to all sheets with variable starting point

  1. #1
    Registered User
    Join Date
    04-22-2013
    Location
    South Africa
    MS-Off Ver
    Excel 2010
    Posts
    6

    Adding filter to all sheets with variable starting point

    Hi,

    I'm trying to find a solution to adding a macro that will add filters to all worksheets. The problem I'm having is that for various sheets, the filter should start at various points. Eg. for sheet 1 at A2, sheet 2 at A2, sheet 3 at A6, sheet 4 at A5 ans sheet 5 at A1. There's about 60 sheets in all involved.

    What I was thinking is to create a variable first to read the first point where more than one row is populated, and insert the filter on that row then? Is this possible to do, as adding a filter to each sheet, is going to take quite some time?

    Also the range of amount of columns over which the filter should be applied varies (so in this case most likely a lastrow calcuation in the macro).

    Any help/suggestions on this will be appreciated on what kind of code I can use, or if there's a general code for this.

    Regards
    Sean
    Attached Files Attached Files
    Last edited by SeaniGeld; 04-24-2013 at 07:44 AM. Reason: Addiontal Info

  2. #2
    Forum Moderator Leith Ross's Avatar
    Join Date
    01-15-2005
    Location
    San Francisco, Ca
    MS-Off Ver
    2000, 2003, & 2010
    Posts
    23,258

    Re: Adding filter to all sheets with variable starting point

    Hello SeaniGeld,

    The macro below has been added to the attached workbook. This find the header row in each worksheet and turn on the auto-filters.

    Please Login or Register  to view this content.
    Sincerely,
    Leith Ross

    Remember To Do the Following....

    1. Use code tags. Place [CODE] before the first line of code and [/CODE] after the last line of code.
    2. Thank those who have helped you by clicking the Star below the post.
    3. Please mark your post [SOLVED] if it has been answered satisfactorily.


    Old Scottish Proverb...
    Luathaid gu deanamh maille! (Rushing causes delays!)

  3. #3
    Registered User
    Join Date
    04-22-2013
    Location
    South Africa
    MS-Off Ver
    Excel 2010
    Posts
    6

    Re: Adding filter to all sheets with variable starting point

    Hi Leith,

    Tested on a couple of sheets. This really works just like it should! Thanks so much for the help! Changing thread to solved!

    Regards
    Sean

+ 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