Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- https://excel-egy.com/forum/t4005
- ---------------------------------
- Sub Delete_Rows_By_Specific_Range_Union_Method()
- Dim c As Range, r As Range
- Application.ScreenUpdating = False
- For Each c In Range(Cells(2, 5), Cells(2, Cells(2, Columns.Count).End(xlToLeft).Column))
- If IsNumeric(c.Value) Then
- If r Is Nothing Then Set r = Range("A" & c.Value) Else Set r = Union(r, Range("A" & c.Value))
- End If
- Next c
- If Not r Is Nothing Then r.EntireRow.Delete
- Application.ScreenUpdating = True
- End Sub
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement