Russ At Index
Well-known Member
- Joined
- Sep 23, 2002
- Messages
- 706
- Office Version
- 365
- 2016
- Platform
- Windows
- MacOS
Good afternoon ,
Please see code below ...
I have a small problem whereby i wish to delete other named criteria as well as REP 00 from by worksheet.
Along with REP 00 , I wish to also delete rows that contain ( in column D ) , CON 01 , CON 02 and CRT 99.
I am no great "VBAer" , i'm afraid to say , would someone point me in the right direction please .
Many thanks ,
Russ.
Sub test()
With ActiveSheet
.AutoFilterMode = False
With Range("d1", Range("d" & Rows.Count).End(xlUp))
.AutoFilter 1, "*REP 00*"
On Error Resume Next
.Offset(1).SpecialCells(12).EntireRow.Delete
End With
.AutoFilterMode = False
End With
End Sub
Please see code below ...
I have a small problem whereby i wish to delete other named criteria as well as REP 00 from by worksheet.
Along with REP 00 , I wish to also delete rows that contain ( in column D ) , CON 01 , CON 02 and CRT 99.
I am no great "VBAer" , i'm afraid to say , would someone point me in the right direction please .
Many thanks ,
Russ.
Sub test()
With ActiveSheet
.AutoFilterMode = False
With Range("d1", Range("d" & Rows.Count).End(xlUp))
.AutoFilter 1, "*REP 00*"
On Error Resume Next
.Offset(1).SpecialCells(12).EntireRow.Delete
End With
.AutoFilterMode = False
End With
End Sub