because the active sheet now is not sheet a anymore
maybe try like this:
Dim cel As Range
Worksheets("sheet a").Activate
For Each cel In Range("f2:f1000")
If cel.Value = "y" Then
cel.EntireRow.Copy
Worksheets("sheet b").Activate
ActiveSheet.Paste
Application.CutCopyMode = False
ActiveCell.Offset(1, 0).Select
End If
Worksheets("sheet a").Activate
Next
FYI, it will show you sheet a and sheet b back n forth.
If you know what row to be pasted in sheet b, (the last blank row, for example)
the code can be modified.
Bookmarks