Auto delete contents
Hi,
Sub Delete_Rows()
Dim rngF As Range
Dim c As Range
Dim i As Long
Set rngF = ActiveSheet.Range(Cells(1, "F"), _
Cells(Rows.Count, "F").End(xlUp))
'Work backwards from bottom to top when deleting rows
With rngF
For i = .Rows.Count To 1 Step -1
If .Cells(i) < "IND" Then
.Cells(i).EntireRow.Delete
End If
Next i
End With
End Sub
Regards,
OssieMac
" wrote:
Ok, I have a sheet which has a ton of data. I want to delete data only
from 2002-2006, the whole row to be deleted if column F says anything
other than IND
Thanks
|