I am trying to build a code where, if there is change in cell then clear contents from that row only where value of cell changed. here is my code,
Private Sub Worksheet_Change(ByVal Target As Range)
Dim KeyCells As Range
Set KeyCells = Range("I1:I209")
If Not Application.Intersect(KeyCells, Range(Target.Address)) _
Is Nothing Then
If MsgBox("ARE YOU SURE, YOU WANT TO DELETE?", vbYesNo + vbQuestion) = vbNo Then Exit Sub
'WHAT SHOULD BE CODE TO DELETE CONTENTS FROM THAT ROW FROM WHICH CELL VALUE CHANGED
End If
End Sub
Any help will be appreciated. Thank you.