I google'd the code to run a macro depending on a met condition, but I can't seem to make it call the macro. Can anyone help? Here's the code that I got:
If I change AG6 to 1, nothing happens. Help?
Code:
Private Sub Worksheet_Change(ByVal Target As Range)
If Intersect(Target, Range("AG6")) Is Nothing Then
Exit Sub
End If
If Range("AG6") = 1 Then
SomeMacro
End If
End Sub
Sub SomeMacro()
MsgBox ("Hi!")
End Sub
If I change AG6 to 1, nothing happens. Help?