bo_danseuer
New Member
- Joined
- Oct 23, 2012
- Messages
- 8
- Office Version
- 365
- Platform
- MacOS
Hi All,
I have been using the exact same advanced filter in my VBA for at least 20 years (yeah, I'm that old...). I use the same format, same names, same everything. This very simple macro has always worked without fail. However, a few months back, it simply stopped working. No error message. Nothing. It just does not filter any more.
Givens:
These are givens I have always used without any problems. If I do a manual search and copy, my list range = "pivot_data"; criteria range = "find_what"; copy to range = "put_where" (cf. screenshot below), the manual filter works just fine with no hiccups. The simple macro that should do the same thing (and that has always done the same thing in the past) now does nothing.
Again, I reiterate, this macro has worked for centuries... well a long time.
I read two things elsewhere stating that the data ranges and filter names needed to be cleared. So I've created the following macro that I CALL from within the find and copy macro above but that helps nothing.
Any wizards out there who can help?
NB: I am working on sending over an abridged version of the table but it's pretty complex. Please bear with me.
I have been using the exact same advanced filter in my VBA for at least 20 years (yeah, I'm that old...). I use the same format, same names, same everything. This very simple macro has always worked without fail. However, a few months back, it simply stopped working. No error message. Nothing. It just does not filter any more.
Givens:
- one large data table ("data import") with that contains various new data imported daily
- one dashboard with various pivot tables and graphes
- one slicer to allow user to select the reporting date based on client name, year, and month
- one filter table (called Monthly Rpt);
- named ranges for all the data = "pivot_data";
- named ranges for the advanced filter are: search criteria = "find_what"; copy to range = "put_where"
Range("pivot_data").AdvancedFilter Action:=xlFilterCopy, CriteriaRange:= _
Range("find_what"), CopyToRange:=Range("put_where"), Unique:=False
Again, I reiterate, this macro has worked for centuries... well a long time.
I read two things elsewhere stating that the data ranges and filter names needed to be cleared. So I've created the following macro that I CALL from within the find and copy macro above but that helps nothing.
Sub delete_filterNames()
' Delete names
Range("put_where").Offset(1, 0).Select
Range(Selection, Selection.End(xlDown)).Select
Selection.ClearContents
On Error Resume Next
With ActiveWorkbook
.Names("_filterdatabase").Delete
.Names("Criteria").Delete
.Names("Extract").Delete
End With
On Error GoTo 0
End Sub
Any wizards out there who can help?
NB: I am working on sending over an abridged version of the table but it's pretty complex. Please bear with me.