D
Dayton
I use the below marco to delete rows of unwanted data. This works exactly
how I needed it to. However the values are dynamic from day to day and are
increasing from 3 different values to 20 or more. Insted of typing new lines
of AND statements each day is there a way to reference these values.
Thanks
Dayton
Sub Delete()
Dim LastRow As Long
Dim x As Long
LastRow = Range("A6536").End(xlUp).Row
For x = LastRow To 1 Step -1
If Not (Range("A" & x).Value Like "FZA3764R") _
And Not (Range("B" & x).Value Like "JGA9799T") _
And Not (Range("B" & x).Value Like "RFZ3763B") _
Then
Range("A" & x).EntireRow.Delete
End If
Next 'x
End Sub
how I needed it to. However the values are dynamic from day to day and are
increasing from 3 different values to 20 or more. Insted of typing new lines
of AND statements each day is there a way to reference these values.
Thanks
Dayton
Sub Delete()
Dim LastRow As Long
Dim x As Long
LastRow = Range("A6536").End(xlUp).Row
For x = LastRow To 1 Step -1
If Not (Range("A" & x).Value Like "FZA3764R") _
And Not (Range("B" & x).Value Like "JGA9799T") _
And Not (Range("B" & x).Value Like "RFZ3763B") _
Then
Range("A" & x).EntireRow.Delete
End If
Next 'x
End Sub