Hello,
I am having trouble with the below code, I am trying to put it together myself and as a selftaughter I am struggling.
Can someone give me a hand? Its saying "named argument not found" at:
Criterea:=Range("ModelMeter")
Private Sub Worksheet_Change(ByVal Target As Range)
' Pattern Macro
If Not Application.Intersect(Target, Range("ModelMeter")) Is Nothing Then
With Range("Patterns")
If .Range("Patterns").FilterMode = True Then
Range("Patterns").ShowAllData
End If
.AutoFilter field:=2, Criterea:=Range("ModelMeter")
SortFields.Add _
Key:=Range("Patterns[Model]"), SortOn:=xlSortOnValues, Order:= _
xlAscending, DataOption:=xlSortNormal
SortFields.Add _
Key:=Range("Patterns[Test Point]"), SortOn:=xlSortOnValues, Order:= _
xlAscending, DataOption:=xlSortNormal
With ActiveWorkbook.Worksheets("Patterns").ListObjects("Patterns").Sort
.Header = xlYes
.MatchCase = False
.Orientation = xlTopToBottom
.SortMethod = xlPinYin
.Apply
End With
.AutoFilter field:=2, Criterea:=Range("ModelMeter")
Range("Patterns[[Counts Divisor]:[Manual Applied Value]]").SpecialCells(xlCellTypeVisible).Copy
With Sheets("Test Sheet")
.Range("Test_Results[[Counts Divisor]:[Manual Applied Value]]").PasteSpecial xlPasteValues
End With
Application.CutCopyMode = False
End With
End If
End Sub
Bookmarks