Matt_Straya
Member
Hi,
I have created a macro that finds rows that have the word "Completed" in it and then copies those rows and inserts them into another sheet called "Completed",
What I'd like it to do is always insert the copied cells at the top of the sheet "Completed". Any advice is warmly welcomed!
I have created a macro that finds rows that have the word "Completed" in it and then copies those rows and inserts them into another sheet called "Completed",
What I'd like it to do is always insert the copied cells at the top of the sheet "Completed". Any advice is warmly welcomed!
Code:
Sub CopyRows()
Dim bottomL As Integer
Dim x As Integer
bottomL = Sheets("2016").Range("O" & Rows.Count).End(xlUp).Row: x = 1
Dim c As Range
For Each c In Sheets("2016").Range("O6:O" & bottomL)
If c.Value = "Completed" Then
c.EntireRow.Copy Worksheets("Completed").Range("A" & x)
x = x + 1
End If
Next c
End Sub