Hi guys,
I am having an issue getting some VBA to work for me. I copy and paste a sheet from one document into mine. My code formats the document slightly before then filtering from 2 columns and having any hidden rows removed.
Filtered columns are E ("BP10-AMB", "CY10-B/LINE", "GT10-B/LINE", "GT10-NF") and column f ("Overs")
Once filtered, I need the remaining rows deleted. I have tried using the below code but get 'Invalid or unqualified reference' and '.Parent.AutoFilter.Range.Offset(1).EntireRow.Delete' highlighted.
Any help would be, as always, appreciated!
Sub Overs_Sort()
'
' Overs_Sort Macro
'
'
Range("1:11,14:14").Select
Range("A14").Activate
Selection.Delete Shift:=xlUp
ActiveSheet.Shapes.Range(Array("Picture 2")).Select
Selection.Delete
Columns("A:I").Select
Selection.AutoFilter
ActiveSheet.Range("$A$1:$I$444").AutoFilter Field:=5, Criteria1:=Array( _
"BP10-AMB", "CY10-B/LINE", "GT10-B/LINE", "GT10-NF"), Operator:=xlFilterValues
ActiveSheet.Range("$A$1:$I$444").AutoFilter Field:=6, Criteria1:="OVER"
.Parent.AutoFilter.Range.Offset(1).EntireRow.Delete
.Parent.AutoFilterMode = False
End Sub
I am having an issue getting some VBA to work for me. I copy and paste a sheet from one document into mine. My code formats the document slightly before then filtering from 2 columns and having any hidden rows removed.
Filtered columns are E ("BP10-AMB", "CY10-B/LINE", "GT10-B/LINE", "GT10-NF") and column f ("Overs")
Once filtered, I need the remaining rows deleted. I have tried using the below code but get 'Invalid or unqualified reference' and '.Parent.AutoFilter.Range.Offset(1).EntireRow.Delete' highlighted.
Any help would be, as always, appreciated!
Sub Overs_Sort()
'
' Overs_Sort Macro
'
'
Range("1:11,14:14").Select
Range("A14").Activate
Selection.Delete Shift:=xlUp
ActiveSheet.Shapes.Range(Array("Picture 2")).Select
Selection.Delete
Columns("A:I").Select
Selection.AutoFilter
ActiveSheet.Range("$A$1:$I$444").AutoFilter Field:=5, Criteria1:=Array( _
"BP10-AMB", "CY10-B/LINE", "GT10-B/LINE", "GT10-NF"), Operator:=xlFilterValues
ActiveSheet.Range("$A$1:$I$444").AutoFilter Field:=6, Criteria1:="OVER"
.Parent.AutoFilter.Range.Offset(1).EntireRow.Delete
.Parent.AutoFilterMode = False
End Sub