K
kevin carter
Hi
We have the following code that filters a range in database(no problem)
this code is looking at column A which is a week number(11)
what we now need to do is extend this code to filter two ranges
the second range is column H and is days of the week(Monday)
Is it possible to expand this code to do this?
Private Sub Worksheet_Change(ByVal Target As Range)
If Target.Row = 2 And Target.Column = 3 Then
Sheets("data2").Range("Criteria").Calculate
Worksheets("data2").Range("Database") _
.AdvancedFilter Action:=xlFilterCopy, _
CriteriaRange:=Sheets("data2").Range("Criteria"), _
CopyToRange:=Range("A6:i6"), Unique:=False
Sheets("Data Entry").Range("D2").Calculate
End If
End Sub
thanks in advance
Kevin
We have the following code that filters a range in database(no problem)
this code is looking at column A which is a week number(11)
what we now need to do is extend this code to filter two ranges
the second range is column H and is days of the week(Monday)
Is it possible to expand this code to do this?
Private Sub Worksheet_Change(ByVal Target As Range)
If Target.Row = 2 And Target.Column = 3 Then
Sheets("data2").Range("Criteria").Calculate
Worksheets("data2").Range("Database") _
.AdvancedFilter Action:=xlFilterCopy, _
CriteriaRange:=Sheets("data2").Range("Criteria"), _
CopyToRange:=Range("A6:i6"), Unique:=False
Sheets("Data Entry").Range("D2").Calculate
End If
End Sub
thanks in advance
Kevin