afterupdate event in Excel

M

md903

I would like to add an AfterUpdate action to a cell to clear the contents of
a second cell. For example, if the contents of cell A1 changes, I want it to
clear the contents of cell B1. Cell A1 will be updated manually.
 
A

alf

I would like to add an AfterUpdate action to a cell to clear the contentsof
a second cell.  For example, if the contents of cell A1 changes, I wantit to
clear the contents of cell B1.  Cell A1 will be updated manually.

Use WorkSheet "Change" Event, and test the adress of the target cell:

Private Sub Worksheet_Change(ByVal Target As Range)
If Target.address = "$A$1" Then
Range("B1") = ""
End If
End Sub
 
Top