+ Reply to Thread
Results 1 to 9 of 9

Advanced Filtering Macro takes out the existing filter

  1. #1
    Registered User
    Join Date
    04-27-2010
    Location
    India
    MS-Off Ver
    Excel 2007
    Posts
    16

    Question Advanced Filtering Macro takes out the existing filter

    Hello,

    I am unable to use advanced filtering and normal filtering in the same spreadhseet.

    To explain I have created two buttons in the s/sheet and have assigned advanced filtering macros to these. When I run this macro (press the button) the existing filter (on column D) goes away. Below is the macro used for one button

    -----------------------
    Please Login or Register  to view this content.
    -----------------------

    I want the existing filter (Column D) in the excel to remain and also use the advanced filter Macro. Is there a way out?

    Regards,
    Sachin

  2. #2
    Registered User
    Join Date
    04-27-2010
    Location
    India
    MS-Off Ver
    Excel 2007
    Posts
    16

    Re: Advanced Filtering Macro takes out the existing filter

    I've made changes as per the forum rules.

  3. #3
    Forum Expert romperstomper's Avatar
    Join Date
    08-13-2008
    Location
    East Sussex, UK
    MS-Off Ver
    365, varying versions/builds
    Posts
    21,298

    Re: Advanced Filtering Macro takes out the existing filter

    You can't use an advanced filter and autofilter on the same range.
    Remember what the dormouse said
    Feed your head

  4. #4
    Registered User
    Join Date
    04-27-2010
    Location
    India
    MS-Off Ver
    Excel 2007
    Posts
    16

    Re: Advanced Filtering Macro takes out the existing filter

    The range is different. The range for the normal filter is B4 to D29. The advanced filter macro is for range C34:DN58.

    Please assist

  5. #5
    Forum Expert romperstomper's Avatar
    Join Date
    08-13-2008
    Location
    East Sussex, UK
    MS-Off Ver
    365, varying versions/builds
    Posts
    21,298

    Re: Advanced Filtering Macro takes out the existing filter

    Unless you're using Tables, it doesn't actually matter. You can't use both on a sheet at once.

  6. #6
    Registered User
    Join Date
    04-27-2010
    Location
    India
    MS-Off Ver
    Excel 2007
    Posts
    16

    Re: Advanced Filtering Macro takes out the existing filter

    Not sure if I've understood what you mean. To further explain my question I am attaching a sample Excel.

    Please note there is a filter on B2 and C2 already. However when i press either of the button (B25 or C25) the filter on B2/C2 goes away. Is there a way by which I do not have to change anything on the spreadsheet and still retain all filters especially filter on B2/C2?

    Regards,
    Sachin
    Attached Files Attached Files

  7. #7
    Forum Expert romperstomper's Avatar
    Join Date
    08-13-2008
    Location
    East Sussex, UK
    MS-Off Ver
    365, varying versions/builds
    Posts
    21,298

    Re: Advanced Filtering Macro takes out the existing filter

    Convert the top range into a table. Select it, then choose Insert - Table. You can now filter that table and still use your advanced filter code.

  8. #8
    Registered User
    Join Date
    04-27-2010
    Location
    India
    MS-Off Ver
    Excel 2007
    Posts
    16

    Re: Advanced Filtering Macro takes out the existing filter

    Perfect. This solves my query. Thanks!!

  9. #9
    Forum Expert romperstomper's Avatar
    Join Date
    08-13-2008
    Location
    East Sussex, UK
    MS-Off Ver
    365, varying versions/builds
    Posts
    21,298

    Re: Advanced Filtering Macro takes out the existing filter

    Glad to help.

+ 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. Replies: 8
    Last Post: 04-15-2014, 04:35 AM
  2. Replies: 5
    Last Post: 12-19-2013, 06:58 AM
  3. Replies: 3
    Last Post: 05-15-2011, 11:46 AM
  4. Macro that takes existing data into consideration
    By helen_007 in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 07-21-2008, 06:34 PM
  5. Replies: 0
    Last Post: 06-20-2007, 08:53 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