Tuesday, October 15, 2013

Run Macro if cell value changes

There are certain situations when one wants to execute the code based on a particular cell. If the value of that particular cell changes the code should execute,here is the code:

Private Sub Worksheet_Change(ByVal Target As Range)
    If Target.Address = "$BA$27" Then
        'Do your stuff here
    End If
End Sub


  1. Thanks for making this code readily available, thanks :)

  2. @Jason: Appreciate your feedback. Please do follow our blog to get regular updates and codes. We try to make sure that the codes that we post can be easily used.