Help Request - for Advanced Filter Macro VBA

Closed
evergreenX Posts 7 Registration date Saturday September 26, 2015 Status Member Last seen October 8, 2015 - Oct 2, 2015 at 08:50 AM
evergreenX Posts 7 Registration date Saturday September 26, 2015 Status Member Last seen October 8, 2015 - Oct 8, 2015 at 06:44 AM
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


Related:

1 response

rizvisa1 Posts 4478 Registration date Thursday January 28, 2010 Status Contributor Last seen May 5, 2022 766
Oct 6, 2015 at 12:17 PM
without vba can you filter? I dont see any filter being applied in your vba
0
evergreenX Posts 7 Registration date Saturday September 26, 2015 Status Member Last seen October 8, 2015
Oct 7, 2015 at 03:41 AM
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
0
rizvisa1 Posts 4478 Registration date Thursday January 28, 2010 Status Contributor Last seen May 5, 2022 766
Oct 7, 2015 at 12:00 PM
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
0
evergreenX Posts 7 Registration date Saturday September 26, 2015 Status Member Last seen October 8, 2015
Oct 8, 2015 at 06:44 AM
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?
0