Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Problem # 1 : Delete Rows where
Col "A" Cells are < "F1PP601 Row 1 Col A Col B Row 2 F601 AWP Row 3 F1PPM60602 AW2 Row 4 F1PPM60601 AWP Row 5 F1PPM60601 AW3 Row 6 F1PPM60603 AW2 Row 7 F1PPM60602 AW1 Row 8 F1PPM60601 AW$ .. Sub DeleteRows() Dim strCheck As String Dim LRow As Long, i As Long Dim varData As Variant With Application .Calculation = xlCalculationManual .ScreenUpdating = False End With strCheck = "F1PPM60601,F1PPM60602" With Sheets("PM4") LRow = .Cells(Rows.Count, 1).End(xlUp).Row varData = .Range("P2:P" & LRow) For i = UBound(varData) To LBound(varData) Step -1 If InStr(strCheck, varData(i, 1)) = 0 Then Rows(i + 1).Delete End If Next End With With Sheets("PM4") LRow = .Cells(Rows.Count, 1).End(xlUp).Row varData = .Range("BE2:BE" & LRow) For i = UBound(varData) To LBound(varData) Step -1 With .Cells(i, "BE") If Not IsError(.Value) Then If .Value = "AWP" Then .EntireRow.Delete End If End With Next End With With Application .Calculation = xlCalculationAutomatic .ScreenUpdating = True End With End Sub |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Processing taking a really long time | Excel Discussion (Misc queries) | |||
deleting rows in a worksheet if condition is met | Excel Discussion (Misc queries) | |||
removing blank rows taking a long time | Excel Programming | |||
deleting the rows depending on the result of a condition involving two columns. | Excel Programming | |||
deleting rows, takes a long time! | Excel Programming |