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

R

Rosey

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
 
D

Don Guillett

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
 
Top