Aaron Sharples
Aaron Sharples

Reputation: 11

How do I get the VBA Code to stop overwriting when I copy the data to another sheet

I have a VBA macro which is supposed to copy data from one sheet to another when the row is highlighted. It sort of does this, but it defaults to overwriting the end row, I've tried changing it but it seems to fail every time. Can anyone give me some advice please.

Option Compare Text
Sub move_rows_to_another_sheet()
For Each myCell In Selection.Columns(12).Cells
If myCell.Value = "Yes" Then
myCell.EntireRow.Copy Worksheets("CompletedV2").Range("A" & Rows.Count).End(3)(1)
End If
Next
End Sub

Upvotes: 0

Views: 78

Answers (0)

Related Questions