How do you run a Macro from an IF statement in Excel 2000?

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I have recorded a Macro that runs correctly, but need it to run from an If
function after user has entered a particular word. Any help were be
appreciated.
Thanks Rosey
 
right click sheet tab>view code>insert this

Private Sub Worksheet_Change(ByVal Target As Range)
If Target.Address <> "$B$2" Then Exit Sub
If UCase(Target) = "JOE" Then Call bill
End Sub

Sub bill()
MsgBox "Hi there Joe"
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