Help Request - for Advanced Filter Macro VBA

Closed
Report
Posts
8
Registration date
Saturday September 26, 2015
Status
Member
Last seen
October 8, 2015
-
Posts
8
Registration date
Saturday September 26, 2015
Status
Member
Last seen
October 8, 2015
-
Hello,
I would like to have data from my master sheet to another one based on multiple criteria filter.
My master sheet can be manually filled and it may have blank cells.
Two Macros developed in the VBA project:
______________________________________________________________________
Sub FilterMe()
'
' FilterMe Macro
' Advanced Filter
'
' Keyboard Shortcut: Ctrl+Shift+D

'Application.CutCopyMode = False
Sheet1.Range("durations#All").AdvancedFilter Action:=xlFilterCopy _
, CopyToRange:=Sheet58.Range("A11:du15000"), _
Unique:=False
'ActiveWindow.SmallScroll Down:=-3
End Sub
_______________________________________________________________________
Sub ClearMe()
'
' ClearMe Macro
' Clear Data
'
' Keyboard Shortcut: Ctrl+Shift+C
'
Range("A12:DU12").Select
Range(Selection, Selection.End(xlDown)).Select
ActiveWindow.SmallScroll Down:=-126
Selection.Clear
End Sub
_______________________________________________________________________

Both data list range and filtered data range are tables


The blank cells are managed by the following formula:
=(IF(DY3="","*",DY3))

The issue is that the advanced filter basically report all lines without filtering as defined per the Criteria range (selecting one or more criteria condition leaving the remaining conditions blank)

Please help!!
thanks a lot


1 reply

Posts
4476
Registration date
Thursday January 28, 2010
Status
Contributor
Last seen
August 2, 2020
768
without vba can you filter? I dont see any filter being applied in your vba
Posts
8
Registration date
Saturday September 26, 2015
Status
Member
Last seen
October 8, 2015

Thanks a lot for your reply.
Most likely this issue is due my limited VBA coding understanding.

Let me try to clarify more:
Interested Data Sections are 4:
1) MDB - Master Database (multiple lines row data with MDB header - 1st line row for the header and subsequent line rows for the row data)

2) AFD - Advanced Filtered Data (Multiple lines section where it is supposed to shows the final filtered result list - 1st line row for the header and subsequent line rows for the filtered data)


3) SI - Search Input (2 rows section where user has to input the wanted filtering criteria to have data filtered)
(1st row for the header and 2nd row for the inputs)

4) CB - Criteria Block for the advanced filter ( 2 rows section where Search input cells linked by a conditional formula as (IF(DY3="","*",DY3)).
(1st row for the header and 2nd row for the inputs)

The conditional formula purpose is to capture any inputted criteria from Search Input Section adding the wildcard (*) in case of blank cells left in Search Input Section.

NOTE: all four headers have equal name and format

ISSUE: same result showing all data from the MDB without any filter applied regardless same criteria are inputted in any cell of the SI section 2nd row.

Any suggestion/advice to progress?
thanks a lot for your help
Posts
4476
Registration date
Thursday January 28, 2010
Status
Contributor
Last seen
August 2, 2020
768
sorry i was not able to understand your requirement

may be if you could record your macro and post it then it may make more sense

you can start the macro recorder. perform one set of operation and then stop the recorder

if you can make it work manually the way you want macro to work then may be it is doable, but recording the macro would show you a code that can be modified to suit more
Posts
8
Registration date
Saturday September 26, 2015
Status
Member
Last seen
October 8, 2015

I may post the spreadsheet with the macro, but I am unable to see any "add attachment" feature......are the forum members enabled to attach files on their topic threads?