am attempting to remove data from a worksheet based on a given date range. On sheet "Grower Reporting" I have a small data set with dates in column L. The rest of the data are in columns N, M and O. In the same worksheet I have two cells that define the date range, cell "A2"=Start Date and cell "B2"= End Date. I am attempting to remove from my dataset any date & adjacent data that does not fall into the given date range.
Thanks to ARich and varocarbas for helping me get this far!
Here is what I have done (bear with me, I have a tenuous grasp of coding):
Sub delete_data()
Dim startDate As Date
Dim endDate As Date
Dim r_date As Date
startDate = Sheets("Grower Reporting").Range("a2").Value
endDate = Sheets("Grower Reporting").Range("b2").Value
Set r = Sheets("Grower Reporting").Range("L:L").Find(r_date, Range("L2"), _
LookIn:=xlValues, lookat:=xlWhole, searchdirection:=xlNext)
If (r_date >= startDate And r_date <= endDate) Then
r.Offset(0, -1).Value = " "
End If
End Sub
The above code doesn't seem to do anything. I think I am on the right track but am in dire need of some guidance.