Thanks in advance.
Decided to post another question since it's a bit different from the other one I asked.
I want to setup a auto filtering Marco to compare against a list of ipaddress range (over 50 of them) , copy out the results into a new sheet, and delete all the rows that was flitered in the original sheet,leaving the other ipaddress and other rows item intact.
Using recording marco, I can only filter and copy two ipaddress range. The ipaddress examples can be 10.61.22.* or 10.1.*. Any ip address that beings with the IP will be matched, flitered, copy into a new sheet and then deleted.
Will like to check if I can create an array for this or for the Marco/vba to compare to another column and filter the IPs I needed.
Automarco code as below
Sub IP()
'
' IP Macro
'
Columns("H:H").Select
Application.CutCopyMode = False
Selection.AutoFilter
ActiveSheet.Range("$H$1:$H$52509").AutoFilter Field:=1, Criteria1:= _
"=10.61.22*", Operator:=xlOr, Criteria2:="=10.1.**"
Cells.Select
Selection.Copy
Sheets("Sheet2").Select
Selection.PasteSpecial Paste:=xlPasteValues, Operation:=xlNone, SkipBlanks _
:=False, Transpose:=False
Sheets("Sheet1").Select
Range("A2:L2").Select
Range(Selection, Selection.End(xlDown)).Select
Application.CutCopyMode = False
Selection.EntireRow.Delete
ActiveSheet.ShowAllData
End Sub