Not sure what is going wrong with the following code, I am getting the Compile Error- Sub or Function not defined.
I am trying to delete all rows which dont have Cell value Ed.
Sub Macro1()
Dim r As Long
Dim FRow As Long
Dim LRow As Long
FRow = 2
LRow = 1000
For r = LRow To FRow Step -1
If Cell(r, 3) <> "Ed" Then
Rows("r").Select
Selection.Delete
End If
Next r
End Sub
I am trying to delete all rows which dont have Cell value Ed.
Sub Macro1()
Dim r As Long
Dim FRow As Long
Dim LRow As Long
FRow = 2
LRow = 1000
For r = LRow To FRow Step -1
If Cell(r, 3) <> "Ed" Then
Rows("r").Select
Selection.Delete
End If
Next r
End Sub