View Single Post
Old 03-09-2018, 05:36 AM   #1
Philocthetes
Has a great deal to learn
Silver Supporter
 
Join Date: Dec 2017
Posts: 21
Thanks: 10
Thanked 0 Times in 0 Posts
Philocthetes is on a distinguished road
Seeking recommendations for Excel VBA book for newbies

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

Philocthetes is offline   Reply With Quote