box of moonlight
New Member
- Joined
- Dec 18, 2017
- Messages
- 2
I need some help with VBA code on an Excel spreadsheet.
the code below only solve my problem for clearing cell "C6" when entering data in cells C5:D5. I would like it to clear cells "C5:D5" when entering data in cells C6 also.
Private Sub Worksheet_Change(ByVal Target As Range)
If Not Intersect(Target, Range("C5:D5")) Is Nothing Then
Range("C6").ClearContents
End If
End Sub
Thank you in advance for your help....
the code below only solve my problem for clearing cell "C6" when entering data in cells C5:D5. I would like it to clear cells "C5:D5" when entering data in cells C6 also.
Private Sub Worksheet_Change(ByVal Target As Range)
If Not Intersect(Target, Range("C5:D5")) Is Nothing Then
Range("C6").ClearContents
End If
End Sub
Thank you in advance for your help....