I am trying to find all values greater than 6 in the Rep column, delete the entire row, and insert a blank row.
I tried For Each Next loop, With and Do While. The dataset has over 5000 rows so I chose the column as range but it won't go to the next or the app crashes.
I searched the internet but there are few useful sources for what I'm trying to do. The code I have is a mash of approaches.
Public Sub DRS_FindAll_Delete()
Dim c As Range
Dim firstAddress As String
Dim WorkRng As Range
Set WorkRng = Application.Selection
Set WorkRng = Application.InputBox("Range (Column)", xTitleID, WorkRng.Address, Type:=8)
Dim x As Integer
x = xlValues > 6
For Each c In WorkRng
Set c = Cells.Find(x, LookIn:=xlValues)
If Not c Is Nothing Then
firstAddress = c.Address
Do
x.EntireRow.Delete
Set c = Cells.FindNext(c)
Loop While Not c Is Nothing
End If
Next
MsgBox ("All done!")