Hello experts.
My question is:
How do I detect the cell data change in order to run a Macro when this happens?
Example:
If data in cell D5 changes then run Macro1
I'm using Excel 2003. Thanks in advance.
"Strong is who knows his own capacities, but is still stronger who also knows his own weaknesses". Deladier M.
Hi,
You can try :
HTHPrivate Sub Worksheet_Change(ByVal Target As Range) If Target.Address <> "$D$5" Then Exit Sub Call Macro1 End Sub
I was trying the code but it did not work for me, and finally with a little change, it worked fine, like this:
Private Sub Worksheet_Change(ByVal Target As Range)
If Target.Address(False, False) = "D5" Then
Macro1
End If
End Sub
Thanks for your help.
"Strong is who knows his own capacities, but is still stronger who also knows his own weaknesses". Deladier M.
Please edit your post to add cde tags.
Microsoft MVP - Excel
Entia non sunt multiplicanda sine necessitate
There are currently 1 users browsing this thread. (0 members and 1 guests)
Bookmarks