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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top