I would think that this should be relatively easy, but I can't seem to find the answer anywhere. Basically, if a cell value exists in a list on another worksheet then move to next row. If the cell value does NOT exist then look at columns J, K, L and M and see if a specific value exists in each. If any of these cells contain this criteria then copy the row and add it to the bottom of a growing list on another sheet. Here is what I have so far.
Sub OrdersHeld()
Application.ScreenUpdating = False
Dim x As Double
Dim ws As Worksheet
Dim numberofrows As Double
numberofrows = 0
DoEvents
Set ws = Sheets("Orders")
numberofrows = ws.UsedRange.Rows.Count
x = 1
i = 0
For i = 0 To numberofrows
If ws.Cells(x, 10).Value = "1" Or ws.Cells(x, 11).Value = "80" _
Or ws.Cells(x, 12).Value = "1" Or ws.Cells(x, 12).Value = "2" Then
ws.Cells(x, 1).EntireRow.Copy
End If
x = x + 1
Next i
End Sub
Bookmarks