View Single Post
  #4   Report Post  
Posted to microsoft.public.excel.programming
Per Jessen Per Jessen is offline
external usenet poster
 
Posts: 1,533
Default Help with Loopas


Hi

Try this:

Sub MoveClosedRows()
Dim LastRow As Long
Dim r As Long
Dim off As Long
Application.ScreenUpdating = False
LastRow = Range("F" & Rows.Count).End(xlUp).Row
For r = LastRow To 2 Step -1 ' Headings in row 1
If Cells(r, "F").Value = "Closed" Then
Rows(r).Copy Destination:=Sheets _
("Completed Tasks").Range("A2").Offset(off, 0)
Rows(r).Delete
off = off + 1
End If
Next
Application.ScreenUpdating = True
End Sub

Regards,
Per

skrev i meddelelsen
...
On Dec 9, 6:49 pm, wrote:
I deal with a spreadsheet that has a list in a column. (On each row
in the column) You can select either open or closed. I wanted to do
some sort of Loop whereby If the word Closed (could use a "Find"
function?) in that particular row in column F then I would like to cut
that row and paste it into another workbook then delete the old row.

Thanks