I was hoping for some assistance with some vba to clear a drop down data validation selection which is in merged cells I3:L3 specifically when cell H2 equals TRUE. If cell H2 equals FALSE I want the name selected in the drop down menu that is visible to remain visible. I tried the following code, which I found online but it didn't work:
Private Sub Worksheet_Change(ByVal Target As Range)
Dim rng1 As Range
Dim rng2 As Range
Set rng1 = Me.Range("H2")
Set rng2 = Me.Range("I3:L3")
' Restrict the event change detection to only cell A1
If Not Intersect(Target, rng1) Is Nothing Then
Application.EnableEvents = False ' Prevent macro looping
If LCase(rng1.Value) = True Then
rng2.ClearContents
Else
End If
End If
End Sub
Appreciate your time and help!
Bookmarks