Move Rows with Old Date

K

kre2000

I am trying to create a macro which will search an entire sheet labele
"Current." The macro looks at the most recent date entered in column
(say March 1, 2004)--the most recent date ie ALWAYS the last entry i
column c.

After the macro gets this date, it searches each row in the "Current
spreadsheet for dates which occur earlier than 12 months. So, if i
finds a row with a date of Februrary 28, 2003, it moves that row t
another sheet in the workbook called "Old."

Is this possible
 
D

Don Guillett

try

Sub moverows()
With Sheets("sheet8")
lr = .Cells(Rows.Count, "a").End(xlUp).Row
x = Month(.Cells(Rows.Count, "a").End(xlUp)) - 2
y = 1
For Each c In .Range("a7:a" & lr)
If Month(c) < x Then c.EntireRow.Cut _
Sheets("sheet9").Range("a" & y)
y = y + 1
Next
End With
End Sub
 
K

kre2000

i will test out the above code tomorrow. sorry i did not get bac
sooner, but i became swamped with a critical project
 
Top