Hi
I've just joined the Forum and this is my first post.
I found this code online and pasted into General / Declarations. It is designed to clear the contents of C4 and C12 whenever the value in C2 changes
Private Sub Worksheet_Change(ByVal Target As Range)
If Not Intersect(Target, Range("C2")) Is Nothing Then
Range("C4").ClearContents
Range("C12").ClearContents
End If
End Sub
This works exactly as I want it too, but now I want to add another condition. That is to clear the contents of C12 if C4 changes i.e. I want both these to work in the same sheet.
Required behaviour:
if C2 changes, clear both C4 and C12
if C4 changes, clear C12 only
I'm not a VBA programmer and really not sure where to start. Any tips would be much appreciated!
Thanks!
Bookmarks