Hi there,
I have the same application of the code mentioned here, but with a little twist.
Cells from F8:AJ8 that contains "Fri" (These cells value updates when a month is selected in another cell "F1" drop down list in the "Summary" sheet), should automatically clear all cells in its column containing the value "10". The reason for being specific with the value is because the sheet has a tendency to increase rows or delete rows and i wouldn't want it to clear any other not matching values beyond the border. Point is the range will be open without limitation as rows can be added or deleted.
Is there any way to also return the values back to 10 if the month selection in Sheet "Summary" gets changed.
Private Sub Worksheet_Change(ByVal Target As Range)
Dim cell As Range
' Exit if multiple cells updated at once
If Target.CountLarge > 1 Then Exit Sub
' See if cell is updated in watched range
If (Not Intersect(Target, Range("F8:AJ8")) Is Nothing) And (Target.Value <> "") Then
Application.EnableEvents = False
' Loop through each cell in other range
For Each cell In Range("F9:AJ300")
' See if it matches and clear value
If cell.Value = Target.Value Then cell.ClearContents
Next cell
Application.EnableEvents = True
End If
End Sub
View attachment 54127