+ Reply to Thread
Results 1 to 2 of 2

VBA Advanced Filter - Two Filters Without Deleting Bottom Filter Data In Same Column Range

  1. #1
    Forum Contributor
    Join Date
    03-24-2012
    Location
    Midwest
    MS-Off Ver
    Office 365
    Posts
    120

    VBA Advanced Filter - Two Filters Without Deleting Bottom Filter Data In Same Column Range

    I have a sheet that has two advanced filters that work properly. For the first filter, the header range is between P10:Z10; for the second filter, the header range is between P36:X36. The data dump range for the first filter is P11:Z30; for the second range, it's P37:X56. Here's the code for the first filter:

    Please Login or Register  to view this content.
    Here's the code for the second filter:

    Please Login or Register  to view this content.
    As I mentioned, both filters work--in isolation. However, when I run the macro for the first filter, it wipes out the headers and data used in the second filter. In other words, it clears all text, data, formulas, etc. below the first filter range.

    I have fixed this issue before by not stacking the two filters within the same column range, but it's annoying. I don't see why I can't have two filter ranges within the same column range (in this case, the shared range is P:X).

    Is there anything I can do to the code in the first filter to ensure that it doesn't delete any data below the specified range (it should only affect data between P11:Z30, the dump range)?

    Note that when I run the second filter macro, it does not delete any of the headers/data in the first filter range. The error seems to only occur toward data below the filter range.

  2. #2
    Forum Contributor
    Join Date
    03-24-2012
    Location
    Midwest
    MS-Off Ver
    Office 365
    Posts
    120

    Re: VBA Advanced Filter - Two Filters Without Deleting Bottom Filter Data In Same Column R

    Bump. Let me know if further clarification is needed.

+ 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. [SOLVED] Advanced Filter Code : Criteria Range More Than 1 Row Breaks Filter
    By PaulGW in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 06-10-2021, 04:30 PM
  2. [SOLVED] Find Count of filter, Advanced filter Data
    By linok in forum Excel Programming / VBA / Macros
    Replies: 21
    Last Post: 01-06-2015, 04:41 AM
  3. Second Advanced Filter does not work based on the data generated from the filter
    By mucc1928 in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 08-29-2011, 02:42 PM
  4. Advanced Filter deleting first rows.
    By jodapo in forum Excel General
    Replies: 8
    Last Post: 08-05-2009, 09:58 PM
  5. Using advanced filter in combination with other filters
    By ndenaro in forum Excel Programming / VBA / Macros
    Replies: 7
    Last Post: 07-13-2009, 09:09 AM
  6. Multiple Filters ,Advanced Filter and Autofilter
    By capetownandre in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 04-28-2009, 03:23 AM
  7. advanced filter a range:Advanced Filter function
    By Il Principe in forum Excel Formulas & Functions
    Replies: 0
    Last Post: 09-05-2005, 10:05 PM

Tags for this Thread

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