I need a macro to delete unwanted data
Bob Phillips wrote:
Dim iLastRow As Long
Dim i As Long
iLastRow = Cells(Rows.Count,"C").End(xlUp).Row
For i = iLastRow to 1 Step -1
If Cells(i,"C").Value = "y" Then
Cells(I,"C").Entirerow.Delete
End If
Next i
--
HTH
RP
(remove nothere from the email address if mailing direct)
"Jason" wrote in message
om...
Hi all,
I need to design a macro in Excel that will delete all unwanted
data.
For example: I have fields a,b,c,d. In field c my data is either
x,y,z. If data is y then I want to delete the entire row.
Thanks
|