Hi,
Ive created a helper cell in column S to identify some rows of data I want copied to a new sheet. The code below works, but the paste is literally pasting into a new sheet ("Alert") at the exact row number it was copied from. Some of these rows are thousands of rows apart from each other. I want it to copy the rows identified from the "DB" sheet, but paste it into "Alert" sheet at Row1, Row2, Row3, Row4, etc. Any help is appreciated. Thanks.
Ive created a helper cell in column S to identify some rows of data I want copied to a new sheet. The code below works, but the paste is literally pasting into a new sheet ("Alert") at the exact row number it was copied from. Some of these rows are thousands of rows apart from each other. I want it to copy the rows identified from the "DB" sheet, but paste it into "Alert" sheet at Row1, Row2, Row3, Row4, etc. Any help is appreciated. Thanks.
HTML:
Sub Alert()
For Each Cell In Sheets("DB").Range("S:S")
If Cell.Value = "1" Then
matchRow = Cell.Row
Rows(matchRow & ":" & matchRow).Select
Selection.Copy
Sheets("Alert").Select
ActiveSheet.Rows(matchRow).Select
ActiveSheet.Paste
Sheets("DB").Select
End If
Next
End Sub