When using a worksheet_change event-
Simply activating the target cell fires the code, even if nothing changes.
Can the code below me modified to only fire when there is a visible change.
so if A1 was 15 and I key into A1 and retype 15...then nothing happens.
(ie. can you test to see if the new value = the old value)
This is in Sheet1
Simply activating the target cell fires the code, even if nothing changes.
Can the code below me modified to only fire when there is a visible change.
so if A1 was 15 and I key into A1 and retype 15...then nothing happens.
(ie. can you test to see if the new value = the old value)
This is in Sheet1
Code:
Sub worksheet_change(ByVal Target As Range)
If Not Intersect(Target, Range("A1:B2")) Is Nothing Then
Range("C" & Target.Row) = "test"
Else
'Nothing to Do
End If
End Sub