Below is the macro I use
I search names and if they match I color them.
Cells.FindNext(After:=ActiveCell).Activate
Cells.Find(What:="mount zion", After:=ActiveCell, LookIn:=xlFormulas, _
LookAt:=xlPart, SearchOrder:=xlByRows, SearchDirection:=xlNext, _
MatchCase:=False, SearchFormat:=False).Activate
With Selection.Interior
.Pattern = xlSolid
.PatternColorIndex = xlAutomatic
.Color = 255
.TintAndShade = 0
.PatternTintAndShade = 0
End With
If the name in "WHAT" is not in the file the macro stops and generates "error 91". How can i avoid the macro from stopping and continue to the next routine?
I search names and if they match I color them.
Cells.FindNext(After:=ActiveCell).Activate
Cells.Find(What:="mount zion", After:=ActiveCell, LookIn:=xlFormulas, _
LookAt:=xlPart, SearchOrder:=xlByRows, SearchDirection:=xlNext, _
MatchCase:=False, SearchFormat:=False).Activate
With Selection.Interior
.Pattern = xlSolid
.PatternColorIndex = xlAutomatic
.Color = 255
.TintAndShade = 0
.PatternTintAndShade = 0
End With
If the name in "WHAT" is not in the file the macro stops and generates "error 91". How can i avoid the macro from stopping and continue to the next routine?