Home |
Search |
Today's Posts |
#7
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
J_Knowles,
Thanks so much for your help. It worked just as needed. Pam "J_Knowles" wrote: Here is the part about "*09" and "*10". This will delete rows with *09 or *10 dates. Sub DeleteRows() With ActiveSheet Firstrow = .UsedRange.Cells(1).Row Lastrow = .UsedRange.Rows(.UsedRange.Rows.Count).Row End With For Lrow = Lastrow To Firstrow Step -1 If Not IsError(Cells(Lrow, 1).Value) Then If Cells(Lrow, 1).Value Like "*10" Or _ Cells(Lrow, 1).Value Like "*09" Then ActiveSheet.Cells(Lrow, 1).EntireRow.Delete End If End If Next Lrow End Sub HTH, -- Data Hog "PHisaw" wrote: Also, using part of Ron deBruin's code for deleting rows based on data in cells, how can I search for two entries ("*09" and "*10") without having to copy all the code again for second search? Firstrow = .UsedRange.Cells(1).Row Lastrow = .UsedRange.Rows(.UsedRange.Rows.Count).Row For Lrow = Lastrow To Firstrow Step -1 With .Cells(Lrow, "A") If Not IsError(.Value) Then If .Value Like "*10" Then .EntireRow.Delete End If End With Next Lrow I really appreciate your time and help. Thanks again, Pam |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Formula and worksheet will not working properly | Excel Worksheet Functions | |||
formula not working properly | Excel Worksheet Functions | |||
Yes No box no working properly | Excel Programming | |||
DirectDependents not working properly. | Excel Programming | |||
But not working properly | Excel Discussion (Misc queries) |