Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- Option Explicit
- 'EXCEL TRICKS - 2022-09-18
- 'Clear contents of columns E>N if value in D is deleted
- Private Sub Worksheet_Change(ByVal Target As Range)
- Application.EnableEvents = False 'Turn off event listener to prevent inadvertent loop
- If Target.Column = 4 Then 'Test if we are in column D
- If Target.Value = vbNullString Then Target.Offset(0, 1).Resize(, 10).ClearContents 'Offset from Column D and resize from E to N
- End If
- Application.EnableEvents = True 'Turn on event listeners
- End Sub
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement