Something is wrong w/ this - not returning to the original Active sheet to keep looking for matches and copying each to the newly added sheet?
There were so many variations out there to compare but none match what I'm trying to do with as much simplicity as possible.
(If code "X" is found in Col N, then copy row to a newly added sheet).
Sub Test()
For Each cell In ActiveSheet.Range("N:N")
If cell.Value = "X" Then
matchRow = cell.Row
Rows(matchRow & ":" & matchRow).Select
Selection.Copy
Sheets.Add After:=ActiveSheet
ActiveSheet.Paste
End If
Next
End Sub
Some used named sheets, (wanted to use Active), while Adding a sheet after the active, some used filtering but made the code long and more complex..
Wanted to be able to quickly edit the Range and Search Value -- then run it on the fly from Personal area.
Bookmarks