This should work
Sub move_one_page_to_other()
r = 2
s = 2
Sheets(1).Select
Do Until r = 31 + 1
If Cells(r, 10) = "complete" Or Cells(r, 10) = "deferred" Then
Rows(r).Copy
Sheets(2).Select
Rows(s).Select
Selection.PasteSpecial Paste:=xlPasteValues, Operation:=xlNone, SkipBlanks _
:=False, Transpose:=False
Application.CutCopyMode = False
s = s + 1
Sheets(1).Select
End If
r = r + 1
Loop
Sheets(2).Select
End Sub
NOTE there are some contraints to this macro.
1 It will only run through until line 31 (this can be changed to what ever value you choose simply by changing the Do Until r = 31+1 bit of the code to for example Do Until r = 64 +1)
2 It will only copy rows with the words 'complete' or deferred' in Column J (These words ARE case sensitive, but can be changed in the code also)
Try it out and let me know how you get on
Bookmarks