Philocthetes
Has a great deal to learn
- Local time
- Yesterday, 23:35
- Joined
- Dec 19, 2017
- Messages
- 28
The title pretty much says it all.
I'm looking for something that could help me answer questions for myself, e.g. "If I've got a bunch of find/delete blocks in a macro, how do I get the macro to keep moving if one of the row sets it is working doesn't contain the row I want to delete?"
Range("A1").Select
Range(Selection, Selection.End(xlDown)).Select
Selection.Find(What:="8", After:=ActiveCell, LookIn:=xlFormulas, LookAt _
:=xlPart, SearchOrder:=xlByRows, SearchDirection:=xlNext, MatchCase:= _
False, SearchFormat:=False).Activate
ActiveCell.Rows("1:1").EntireRow.Select
Selection.Delete Shift:=xlUp
Range("A1").Select
Range(Selection, Selection.End(xlDown)).Select
Selection.Find(What:="40", After:=ActiveCell, LookIn:=xlFormulas, LookAt _
:=xlPart, SearchOrder:=xlByRows, SearchDirection:=xlNext, MatchCase:= _
False, SearchFormat:=False).Activate
ActiveCell.Rows("1:1").EntireRow.Select
Selection.Delete Shift:=xlUp
I'm looking for something that could help me answer questions for myself, e.g. "If I've got a bunch of find/delete blocks in a macro, how do I get the macro to keep moving if one of the row sets it is working doesn't contain the row I want to delete?"
Range("A1").Select
Range(Selection, Selection.End(xlDown)).Select
Selection.Find(What:="8", After:=ActiveCell, LookIn:=xlFormulas, LookAt _
:=xlPart, SearchOrder:=xlByRows, SearchDirection:=xlNext, MatchCase:= _
False, SearchFormat:=False).Activate
ActiveCell.Rows("1:1").EntireRow.Select
Selection.Delete Shift:=xlUp
Range("A1").Select
Range(Selection, Selection.End(xlDown)).Select
Selection.Find(What:="40", After:=ActiveCell, LookIn:=xlFormulas, LookAt _
:=xlPart, SearchOrder:=xlByRows, SearchDirection:=xlNext, MatchCase:= _
False, SearchFormat:=False).Activate
ActiveCell.Rows("1:1").EntireRow.Select
Selection.Delete Shift:=xlUp