run macro on cell entry

  • Thread starter Thread starter sleemo
  • Start date Start date
In the VBE window, right click the sheet and view code. Change "(General)"
to "Worksheet" in the top left drop down box, and choose "Change" in the top
right.

Yopu should see:

Private Sub Worksheet_Change(ByVal Target As Range)

End Sub

In the main window. Between these two lines put this:

If Target.Address = "$A$2" And WorksheetFunction.IsNumber(Target.Value) =
True Then Call YourMacro()


Changing "YourMacro()" to the relevant macro.
 
Back
Top