We value your feedback.
Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!
Private Sub DeleteRowsWithSmallAmountAtIssue() ' Delete rows that have a value of Delete in Column B. Dim rng1 As Range Dim rng2 As Range Dim lngRow As Long 'Application.ScreenUpdating = False If [b2] <> vbNullString Then Set rng1 = Range([b2], [b1].End(xlDown)) Else Set rng1 = [b1] End If For lngRow = rng1.Rows.Count To 2 Step -1 If (Cells(lngRow, "B") = "Delete") Then 'Rows(lngRow).EntireRow.Delete If rng2 Is Nothing Then Set rng2 = Rows(lngRow) Else Set rng2 = Union(rng2, Rows(lngRow)) End If Else ' If Left$(Cells(lngRow, "c"), 2) <> "CV" Then Rows(lngRow).EntireRow.Delete End If Next If Not rng2 Is Nothing Then rng2.EntireRow.Delete Application.ScreenUpdating = True End Sub
Add your voice to the tech community where 5M+ people just like you are talking about what matters.
Join the community of 500,000 technology professionals and ask your questions.