Hi,
I am working on delete negative number in a range(in my case is in column J from row 19 to the last row with data).
as of now I use this kind of code
This code working fine just a little bit slow if the amount of data increase.
My question is, are there any fastest way to delete all negative number(including other data in the same row) other then the one I use above?
all your help will be greatly appreciated.
Regards,
Benny
I am working on delete negative number in a range(in my case is in column J from row 19 to the last row with data).
as of now I use this kind of code
Code:
<code style="margin: 0px; padding: 0px; font-style: inherit; font-weight: inherit; line-height: 12px;">'delete negative data on col J
Dim LR As Long, i As Long
LR = Range("J" & Rows.Count).End(xlUp).row
For i = LR To 20 Step -1
' If Range("J" & i).value < 0 Then Rows(i).Delete
Next i</code>
This code working fine just a little bit slow if the amount of data increase.
My question is, are there any fastest way to delete all negative number(including other data in the same row) other then the one I use above?
all your help will be greatly appreciated.
Regards,
Benny