I have values in Col W on sheet imported data
I wanted to delete these rows where the values are < 1 or where value is zero or >= -1
Where running the macro all the rows from row 2 is being deleted
Kindly check my code and kindly amend
I wanted to delete these rows where the values are < 1 or where value is zero or >= -1
Where running the macro all the rows from row 2 is being deleted
Kindly check my code and kindly amend
Code:
Sub Delete_itemslessthan1_IncludingZeroes()
Application.ScreenUpdating = False
Application.EnableEvents = False
Dim LR As Long, i As Long
With Sheets("Imported Data")
LR = .Cells(Rows.Count, "A").End(xlUp).Row
For i = LR To 2 Step -1
If (((.Cells(i, 23).Value) <= 1) Or ((.Cells(i, 23).Value) <= 1) Or _
((.Cells(i, 23).Value) = 0)) Or ((.Cells(i, 23).Value) >= -1) Then .Rows(i).EntireRow.Delete
Next i
End With
Application.ScreenUpdating = True
Application.EnableEvents = True
End Sub