Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Hello all and Happy 4th. I need some help if possible. Below is the
code I have found and tried to modify. What I am trying to accomplish is if "47" is in column "L" AND "No" is in column "S" then that row is deleted. Here is the code I tried to modify. Sub Delete_rows_based_on_ColA_ColB() Sheets("Working").Select Application.ScreenUpdating = False Application.Calculation = xlCalculationManual Dim cell As Range, rng As Range, i As Long Set rng = Columns("L").SpecialCells(xlConstants, xlTextValues) For i = rng.Count To 1 Step -1 If LCase(rng(i).Value) = "47" _ And LCase(rng(i).Offset(7, 1).Value) = "No" _ Then rng(i).EntireRow.Delete Next i Application.Calculation = xlCalculationAutomatic Application.ScreenUpdating = True End Sub Thank you, Kris |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
delete columns based on selection | Excel Discussion (Misc queries) | |||
Delete Columns based on Strings | Excel Programming | |||
How can I delete a row based on Columns H and I | Excel Programming | |||
How can I delete a row based on Columns H and I | Excel Programming | |||
Delete Columns based on a condition | Excel Programming |