TitoBurrito
New Member
- Joined
- Oct 27, 2022
- Messages
- 11
- Office Version
- 365
- Platform
- Windows
Hello,
After research and trial and error I am unable to get this to work.
Here is my code:
With Sheet2.Range("A1:BM1")
.AutoFilter Field:=13, Criteria1:="*EMEA*", Operator:=xlOr, Criteria2:="*Oceania*"
.AutoFilter Field:=42, Criteria1:="="
.Offset(1, 0).Resize(.Rows.Count - 1).SpecialCells(xlCellTypeVisible).Rows.Delete
End With
Sheet2.AutoFilterMode = False
I am trying to filter column 13 with criteria and column 42 for blanks, then delete all the rows that that are populated.
The filtering is working. The deleting of the rows is the problem.
I am getting Run-time error 1004: Application-defined or object-defined error. With the .OFFSET(1,0) ROW BEING HIGHLIGHTED.
Any help would be lovely,
Thank You
After research and trial and error I am unable to get this to work.
Here is my code:
With Sheet2.Range("A1:BM1")
.AutoFilter Field:=13, Criteria1:="*EMEA*", Operator:=xlOr, Criteria2:="*Oceania*"
.AutoFilter Field:=42, Criteria1:="="
.Offset(1, 0).Resize(.Rows.Count - 1).SpecialCells(xlCellTypeVisible).Rows.Delete
End With
Sheet2.AutoFilterMode = False
I am trying to filter column 13 with criteria and column 42 for blanks, then delete all the rows that that are populated.
The filtering is working. The deleting of the rows is the problem.
I am getting Run-time error 1004: Application-defined or object-defined error. With the .OFFSET(1,0) ROW BEING HIGHLIGHTED.
Any help would be lovely,
Thank You