TheWennerWoman
Active Member
- Joined
- Aug 1, 2019
- Messages
- 270
- Office Version
- 365
- Platform
- Windows
Hi,
Is there a quicker way to delete rows than what I'm using:
Many thanks.
Is there a quicker way to delete rows than what I'm using:
Code:
Sub remove()
Dim lastrow As Long
Dim a As Long
Dim b As Long
Dim c As Long
Application.ScreenUpdating = False
Application.Calculation = xlManual
Sheets("upload").Activate
With ActiveSheet
lastrow = .Cells(Rows.Count, "B").End(xlUp).Row
End With
a = WorksheetFunction.Match("Do Not Post", Range("C1:C" & lastrow), 0)
c = 0
For b = lastrow To a Step -1
Select Case Range("C" & b)
Case "Do Not Post"
Rows(b).Delete
c = c + 1
End Select
Next b
End Sub
Many thanks.