You can paste the code below in the ThisWorkbook vba window of the project. It will automatically run the sub red if you type RED in A1. You can add as many of the if lines as you want. A1 is the key range and you can change or expand it to a larger range.
Private Sub Workbook_SheetChange(ByVal Sh As Object, ByVal Target As Range)
Dim KeyCells As Range
Set KeyCells = Range("A1")
If Not Application.Intersect(KeyCells, Range(Target.Address)) _
Is Nothing Then
If KeyCells.Value = "RED" Then red 'Macro to run
'If KeyCells.Value = "GREEN" Then green ' Macro to run
End If
End Sub
Bookmarks