Hi
im trying to filter some data
all the data is contained within "master" and the filtered results need to be in "filter"
I want to have two criteria to filter with from within the "filter" sheet;
1. value of the cell ("C3")
2. dates values in cells ("C4") and ("C5")
Within the "master" sheet, column A contains dates and column B contains the possible values in "filter" C3
The below only has criteria 1 but doesn't work. Can anyone help?
' advanced filter
a = Worksheets("Master").Cells(Rows.Count, 1).End(xlUp).Row
For i = 2 To a
If Worksheets("Filter").Range("C3").Select Then
Worksheets("Master").Rows(i).Copy
Worksheets("Filter").Activate
b = Worksheets("Filter").Cells(Rows.Count, 1).End(xlUp).Row
Worksheets("Filter").Cells(b + 1).Select
ActiveSheet.Paste
End If
Next
Application.CutCopyMode = False
im trying to filter some data
all the data is contained within "master" and the filtered results need to be in "filter"
I want to have two criteria to filter with from within the "filter" sheet;
1. value of the cell ("C3")
2. dates values in cells ("C4") and ("C5")
Within the "master" sheet, column A contains dates and column B contains the possible values in "filter" C3
The below only has criteria 1 but doesn't work. Can anyone help?
' advanced filter
a = Worksheets("Master").Cells(Rows.Count, 1).End(xlUp).Row
For i = 2 To a
If Worksheets("Filter").Range("C3").Select Then
Worksheets("Master").Rows(i).Copy
Worksheets("Filter").Activate
b = Worksheets("Filter").Cells(Rows.Count, 1).End(xlUp).Row
Worksheets("Filter").Cells(b + 1).Select
ActiveSheet.Paste
End If
Next
Application.CutCopyMode = False