itsgrady
Board Regular
- Joined
- Sep 11, 2022
- Messages
- 132
- Office Version
- 2021
- Platform
- Windows
- MacOS
See bold italics part of the code. I am trying to filter the table for more than item. Seems like it would be easy but I am not having any luck. There is one column that I am trying to do the filter for more than one item.
Sub DMwill()
Dim ws As Worksheet
Set ws = ThisWorkbook.Sheets("VPI-All-WhsRpt")
Application.ScreenUpdating = False
If ws.AutoFilterMode Then
ws.AutoFilterMode = False
End If
Sheets("VPI-All-WhsRpt").Activate
ws.ListObjects("VPI_All_WhsRpt").AutoFilter.ShowAllData
ws.ListObjects("VPI_All_WhsRpt").Range.Select
ws.ListObjects("VPI_All_WhsRpt").Range.AutoFilter Field:=11, Criteria1:=("204", "201", "105”)
Set rng = ws.Range("A10")
rng.Select
rng.Application.Goto rng, True
Set rng = Nothing
Set ws = Nothing
Application.ScreenUpdating = True
End Sub
Sub DMwill()
Dim ws As Worksheet
Set ws = ThisWorkbook.Sheets("VPI-All-WhsRpt")
Application.ScreenUpdating = False
If ws.AutoFilterMode Then
ws.AutoFilterMode = False
End If
Sheets("VPI-All-WhsRpt").Activate
ws.ListObjects("VPI_All_WhsRpt").AutoFilter.ShowAllData
ws.ListObjects("VPI_All_WhsRpt").Range.Select
ws.ListObjects("VPI_All_WhsRpt").Range.AutoFilter Field:=11, Criteria1:=("204", "201", "105”)
Set rng = ws.Range("A10")
rng.Select
rng.Application.Goto rng, True
Set rng = Nothing
Set ws = Nothing
Application.ScreenUpdating = True
End Sub