Euro5
asked on
VBA code shorten run time
The code below works to remove lines in column E that have "Unkn".
It takes a very long time to run - is there any way to modify to run more efficiently?
THANK YOU!
It takes a very long time to run - is there any way to modify to run more efficiently?
THANK YOU!
Sub delnozone()
Application.ScreenUpdating = False
Shipping.Activate
Dim i As LongPtr
i = 2
Do Until i > Cells(Cells.Rows.Count, "A").End(xlUp).Row
If Replace(Cells(i, "e").Text, Chr(32), "") = "" Or Cells(i, "e").Text = "Unkn" Then
Rows(i).Delete
Else
i = i + 1
End If
Loop
End Sub
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
Wow so fast!!! Thanks you!!
You're welcome and I'm glad I was able to help.
Expand my profile’s “Full Biography” and you'll find links to some articles I've written that may interest you.
Marty - Microsoft MVP 2009 to 2016
Experts Exchange MVE 2015
Experts Exchange Top Expert Visual Basic Classic 2012 to 2015
Expand my profile’s “Full Biography” and you'll find links to some articles I've written that may interest you.
Marty - Microsoft MVP 2009 to 2016
Experts Exchange MVE 2015
Experts Exchange Top Expert Visual Basic Classic 2012 to 2015
pls try
Open in new window
Regards