I am trying to delete rows based on one columns value! But the column length of the range in the worksheet is dynamic and large.
For example,
If Col C has value less than or equal to 0 that row gets deleted




A
B
C




1
SAM
100


1
SAM
0


1
BRI
-100


1
HAWK
100




It should only give me :




A
B
C




1
SAM
100


1
HAWK
100




How to delete rows based on columns' value?
as said in my comment,try this:
Sub test()
Dim LR As Long
Dim i As Long

LR = Range("A" & Rows.Count).End(xlUp).Row 'get last non blank row number

For i = LR To 1 Step -1 'go backwards starting at LR until row 1
    If Range("C" & i).Value <= 0 Then Range("C" & i).EntireRow.Delete
Next i


End Sub

Before code:

After code executed:

