DarkJester89
Board Regular
- Joined
- Nov 5, 2017
- Messages
- 109
- Office Version
- 2016
- Platform
- Windows
Sheet 1, data with filters
Sheet 2, Dropdown with name range of filter data
Respectfully requesting how to activate filter based on dropdown, to include "All Regions", which would reset the filter to count all.
Workbook
Had assistance with this code with a warning of " code for updating the range of the filter itself " but it keeps throwing up 1004.
Thank you in advance.
Sheet 2, Dropdown with name range of filter data
Respectfully requesting how to activate filter based on dropdown, to include "All Regions", which would reset the filter to count all.
Workbook
Had assistance with this code with a warning of " code for updating the range of the filter itself " but it keeps throwing up 1004.
VBA Code:
Option Explicit
Private Sub Worksheet_Change(ByVal Target As Range)
If Not Intersect(Target, Range("M2")) Is Nothing Then
Select Case Target.Value
Case "All Regions"
ActiveSheet.Range("$G$1:$G$134").AutoFilter Field:=1
Case Else
ActiveSheet.Range("$G$1:$G$134").AutoFilter Field:=1, Criteria1:=Target.Value
End Select
End If
End Sub
Thank you in advance.