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
|Sql server Transfering records getting error #NAME?||6||39|
|How to search column a for a list of 30 different possible strings and return the string name in column b||9||16|
|Access Excel export not behaving||2||25|
|Extract strings / characters from the right till the second occurrence of the underscore character||9||44|
Join the community of 500,000 technology professionals and ask your questions.
Connect with top rated Experts
19 Experts available now in Live!