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:
Here's the code for the second filter:
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.