programsam
Board Regular
- Joined
- Feb 10, 2016
- Messages
- 123
Greetings gang,
Trying to clear contents in the corresponding cell in columns B - E when a change is made on the same row in column A. Making the change using the code below does not trigger a change. Additionally, columns B, C and D are merged so I'm not sure if that's what's causing the issue.
Any assistance you guys can provide is much appreciated.
Trying to clear contents in the corresponding cell in columns B - E when a change is made on the same row in column A. Making the change using the code below does not trigger a change. Additionally, columns B, C and D are merged so I'm not sure if that's what's causing the issue.
Any assistance you guys can provide is much appreciated.
Code:
Private Sub Worksheet_Change(ByVal Target As Range)
Dim rLook As Range, r As Range, Intr As Range
Set rLook = Range("A7:A11")
Set Intr = Intersect(rLook, Target)
If Intr Is Nothing Then Exit Sub
Application.EnableEvents = False
For Each r In Intr
If r.Value <> "" Then
rw = r.Row
Range("B" & rw & ":E" & rw).ClearContents
End If
Next r
Application.EnableEvents = True
End Sub