Euro5
asked on
VBA error search 2 phrases delete row
This code should look for the word multiweight in column A sheet Net_Rates_1
If it finds this, it should look down column A for "Ground CA".
If it finds it, it should delete the row.
I am getting an error "Object does not support this property or method".
Can anyone help??
If it finds this, it should look down column A for "Ground CA".
If it finds it, it should delete the row.
I am getting an error "Object does not support this property or method".
Can anyone help??
Sub GRCADEL1()
Application.ScreenUpdating = False
Net_Rates_1.Activate
Dim rngFindH1 As range
Dim rngFindH2 As range
Set rngFindH1 = ActiveSheet.range("A:C").Find("*Multiweight*")
If (rngFindH1 Is Nothing) Then
Else
Set rngFindH2 = ActiveSheet.range("A:A").Find("Ground CA", after:=rngFindH1.Cells(1, 1))
End If
If (rngFindH1 Is Nothing) Or (rngFindH2 Is Nothing) Then
Else
ActiveSheet.rngFindH2.EntireRow.Delete
End If
End Sub
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
If rgonzo1971's solution doesn't help then please supply a workbook.
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.