I have a list of percentages in column J. The actual cell itself contains a VLOOKUP formula which grabs them from another sheet, but shows the percentage it pulls. Column N contains another vlookup formula, which pulls either the letter "L" or the letter "R". What I am trying to do is loop through the rows and if for example row 2 column J contains the a percentage greater than 90% and column N row 2 contains the letter L, then delete that row. This code does delete stuff(and it seems to be correct), but I get a type mismatch error on
Here is the full code.
Thank you for any assistance.
VBA Code:
If .Cells(x, 10).Value > 0.9 And .Cells(x, 14).Value = "L" Then
Here is the full code.
Thank you for any assistance.
VBA Code:
Sub DeletePlayers()
Dim x As Long
Application.ScreenUpdating = True
With ActiveSheet.UsedRange
For x = 2 To Rows.Count
If .Cells(x, 10).Value > 0.9 And .Cells(x, 14).Value = "L" Then
.Rows(x).EntireRow.Delete
x = x - 1
End If
Next x
End With
Application.ScreenUpdating = False
End Sub