I currently have a number of individual combobox filters that filter individual columns in my table. The problem is, the way things are currently setup each time one of the filters is selected it only filers the rows for that particular filter/column. How can I group this so that if multiple criteria are selected, the table filters for the combination of the selected criteria. Here is the code I have so far for the individual filters:
Private Sub cmbShiftFilter_Change()
Application.ScreenUpdating = False
Range("PSList").Rows.Hidden = False
Row = 7
Do While Cells(Row, 1) <> ""
If cmbShiftFilter = "*" Then
Range("PSList").Rows.Hidden = False
ElseIf Cells(Row, 5) <> cmbShiftFilter.Value Then
Rows(Row).Hidden = True
End If
Row = Row + 1
Loop
Application.ScreenUpdating = True
End Sub
Private Sub cmbLevelFilter_Change()
Application.ScreenUpdating = False
Range("PSList").Rows.Hidden = False
Row = 7
Do While Cells(Row, 1) <> ""
If cmbLevelFilter = "*" Then
Range("PSList").Rows.Hidden = False
ElseIf Cells(Row, 6) <> cmbLevelFilter.Value Then
Rows(Row).Hidden = True
End If
Row = Row + 1
Loop
Application.ScreenUpdating = True
End Sub
Private Sub cmbOverAvailFilter_Change()
Application.ScreenUpdating = False
Range("PSList").Rows.Hidden = False
Row = 7
Do While Cells(Row, 1) <> ""
If cmbOverAvailFilter = "*" Then
Range("PSList").Rows.Hidden = False
ElseIf Cells(Row, 6) <> cmbOverAvailFilter.Value Then
Rows(Row).Hidden = True
End If
Row = Row + 1
Loop
Application.ScreenUpdating = True
End Sub
Thanks!
M
Bookmarks