Re: Filter and Delete Rows
Hi KJBox,
It was choking on the ii (maybe 0 based problem) any way this seemed to fix it along with my different understanding of the chore:
Code
Sub DeleteRowsPWill() 'KjBox - Ozgrid
Dim x, y, z, i As Long, ii As Long
y = Array("Sarah", "David", "Tom", "Bethany", "John", "Katie")
z = Array(0, 1, -1, 2, -2, 3)
With ActiveSheet.UsedRange
x = .Value
For i = 2 To UBound(x, 1)
ii = Application.Match(x(i, 1), y, 0) - 1
If x(i, 5) = z(ii) Then x(i, 1) = ""
Next
.Value = x
.Columns(1).SpecialCells(4).EntireRow.Delete
End With
End Sub
Display More
* I hadn't seen BaraaKhalil's post when I posted this.