A family of Microsoft spreadsheet software with tools for analyzing, charting, and communicating data.
Macro2 and Macro3 will run without error if the active cell is in column B.
If the active cell is not in column B, the argument After:=ActiveCell causes the error.
Solution #1: remove After:=ActiveCell:
For example Macro2:
Sub Macro2()
Columns("B:B").Find(What:="Blue", LookIn _
:=xlFormulas2, LookAt:=xlPart, SearchOrder:=xlByRows, SearchDirection:= _
xlNext, MatchCase:=False, SearchFormat:=False).Activate
End Sub
Solution #2: specify a cell in column B instead of ActiveCell:
Sub Macro2()
Columns("B:B").Find(What:="Blue", After:=Range("B1"), LookIn _
:=xlFormulas2, LookAt:=xlPart, SearchOrder:=xlByRows, SearchDirection:= _
xlNext, MatchCase:=False, SearchFormat:=False).Activate
End Sub