How to run an event upon changing the value of a specific cell?

  • Thread starter Thread starter Wael Fathy
  • Start date Start date
W

Wael Fathy

I want to run an event or a mcaro only when a certain cell is changed.
i.e., if the cell A1 value is changed, then do such and such ...
 
Right click on your sheet tab, view code. Paste this in and modify to suit:

Private Sub Worksheet_Change(ByVal Target As Range)
If Intersect(Target, Range("A1")) Is Nothing Then Exit Sub

'Do something here

End Sub
 
Back
Top