Hi,
I'm trying to write a condition where if the value in column O isn't "XYZ" then that row needs to be deleted:
I keep getting the syntax of the 'delete row i' part wrong. Can anyone help me out?
I'm trying to write a condition where if the value in column O isn't "XYZ" then that row needs to be deleted:
Code:
For i = 1 To Array.Rows.Count
If Cells(5 + i, 15).Value <> "XYZ" Then
'Delete row i
End If
I keep getting the syntax of the 'delete row i' part wrong. Can anyone help me out?