Good Afternoon,
I have the code below working well for the exception of deleting the row out of which my data was copied. Also if Column A is blank on sheet "Allan" it does not find the row(I need it to copy if row 2 is not blank.
Any help would be appreciated.
Public Sub CopyRows()
Sheets("Allan").Select
' Find the last row of data
FinalRow = Cells(Rows.Count, 1).End(xlUp).Row
' Loop through each row
For x = 2 To FinalRow
' Decide if to copy based on column H
ThisValue = Cells(x, 3).Value
If ThisValue = "D" Then
Cells(x, 1).Resize(1, 33).Copy
Sheets("Finished Projects").Select
NextRow = Cells(Rows.Count, 1).End(xlUp).Row + 1
Cells(NextRow, 1).Select
ActiveSheet.Paste
Sheets("Allan").Select
End If
Next x
End Sub
I have the code below working well for the exception of deleting the row out of which my data was copied. Also if Column A is blank on sheet "Allan" it does not find the row(I need it to copy if row 2 is not blank.
Any help would be appreciated.
Public Sub CopyRows()
Sheets("Allan").Select
' Find the last row of data
FinalRow = Cells(Rows.Count, 1).End(xlUp).Row
' Loop through each row
For x = 2 To FinalRow
' Decide if to copy based on column H
ThisValue = Cells(x, 3).Value
If ThisValue = "D" Then
Cells(x, 1).Resize(1, 33).Copy
Sheets("Finished Projects").Select
NextRow = Cells(Rows.Count, 1).End(xlUp).Row + 1
Cells(NextRow, 1).Select
ActiveSheet.Paste
Sheets("Allan").Select
End If
Next x
End Sub