The following VBA code works great, but I want to add more strings to delete
example
Edit the value in the column
I have seen the arrays but still can not find any solution
Dim Range Application.ScreenUpdating = Find as a false set ("C: C") Locate = .Range Find (What: = "House") Find What's Nothing Find Find the Find.EntireRow.Delete Set = .Range ("C:".) FindNext Loop
You can remove rows in a loop, in fact, put your code in the temporary range at a slow speed and then put it at a time Remove
Try it (unchecked).
Due Sampling () Dim sString string retarded MyAr dim as long as the dim delRange range, set as aCell range dim form worksheets like ws = ThisWorkbook.Sheets ( "Sheet1") as' ~~ & gt; The list with ws is set to = lbound (MyAr) for UBound (MyAr) to add more to separate "/" sString = "Hotel / Home / Flat" MyAr = Split (sString, "/") from here ACell = .Columns (3) .Find (What: = MyAr (i) Viewing: = xlValues, _ lookAt: = xlWhole, SearchOrder: = xlByRows, SearchDirection: = xlNext, _ MatchCase: = false, SearchFormat: = false) No aCell is nothing, then there is no delRange, then set delRange = .owsows (aCell.Row), otherwise set delRange = association (delRange, .owsows (aCell.Row)) from the other end, then the next I do not have anything to end with delange, so do not delRange.Delete end subThe above example is for only one term. If you want to repeat then
use an alternative.
Use AutoFilter with the above given orter. See link, this will give you a start.
Comments
Post a Comment