Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Hello,
I have to delete rows meeting any of several criteria. The way I have it now, It searches the same list several times. Can the following be combined somehow??? Range("B27").Activate Do If Left(ActiveCell.Value, 3) = "CA_" Then Selection.EntireRow.Delete Else ActiveCell.Offset(1, 0).Select End If Loop Until IsEmpty(ActiveCell) ActiveCell.Offset(-2, 0).Select Do If Left(ActiveCell.Value, 6) = "Undef_" Then Selection.EntireRow.Delete Else ActiveCell.Offset(1, 0).Select End If Loop Until IsEmpty(ActiveCell) ActiveCell.Offset(-2, 0).Select Do If Left(ActiveCell.Value, 7) = "Target_" Then Selection.EntireRow.Delete Else ActiveCell.Offset(1, 0).Select End If Loop Until IsEmpty(ActiveCell) With ActiveSheet .Rows(1).Insert .Range(MYCOL & 1).Value = "Temp" .UsedRange With Intersect(.Columns(MYCOL), .UsedRange) .AutoFilter Field:=1, Criteria1:="*CA-*" .SpecialCells(xlCellTypeVisible).EntireRow.Delete End With .UsedRange End With |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
How do I combine worksheets w/o enough rows to combine? | Excel Worksheet Functions | |||
Combine cells with the same reference and combine quantities | Excel Discussion (Misc queries) | |||
Need to combine countIF with AND for selection criteria | Excel Discussion (Misc queries) | |||
Improve autofilter combine conditionals with filter criteria | Excel Worksheet Functions | |||
How to combine 2 different SUMPRODUCT criteria into one cell????? | Excel Worksheet Functions |