I am currently using the below code to clear the data in cells K14:O48 if data in A14:B48 changes.
The problem is, if i change data in cells NOT in the A14:B48 range, Data in K:O clears as well. How do I stop that from happening?
Also, is there a way to change the code so that ONLY the row with changed numbers in A and B is cleared in k:o?
(so if i only change info in cell A16, then k16:o16 clears, but the rest remains)
![]()
Private Sub Worksheet_Calculate() Dim c As Range Application.EnableEvents = False For Each c In Range("A14:B48") If c.Value <> 0 Then Range(Cells(c.Row, "K"), Cells(c.Row, "O")).ClearContents End If Next c Application.EnableEvents = True End Sub
Bookmarks