hi, this code is working to move any item in the data set with "A380-800" in column 2 to a new sheet however the entirety of column 2 isn't being captured. I have to run the code 3 or 4 times before all of the rows with "A380-800" in column 2 are moved to the new sheet. The data set is quite large at up to 800 or 900 rows.
I used the following piece of code:
Sub Button2_Click()
Application.ScreenUpdating = False
For Each myCell In Sheet1.Columns(2).Cells
If myCell.Value = "A380-800" Then
myCell.EntireRow.Copy Worksheets("A380-800s").Range("A" & Rows.Count).End(3)(2)
myCell.EntireRow.Delete
End If
Next
End Sub
Bookmarks