Code:
Sub Remove_NoStock()
Dim i As Long
Application.ScreenUpdating = False
For i = Cells(Rows.Count, 1).End(xlUp).Row To 2 Step -1
If Cells(i, 3) = "D" And _
Application.WorksheetFunction.SumIf(Range("A:A"), Cells(i, 1), Range("G:G")) = 0 Then
Cells(i, 1).EntireRow.Delete
End If
Next
Application.ScreenUpdating = True
End Sub
Column "A" is the ItemNumber but there are multiple sizes of with the same ItemNumber, for each ItemNumber that has 0 in the "G"
Available column for ALL sizes these records do not need to be returned.
Suggestions? Thanks in advance.