One of the file I'm working on has a cookie cutter VBA code to default the data validation selection to "Yes", if an input is deleted.
Code:
Private Sub Worksheet_Change(ByVal Target As Range)
Dim xObjV As Validation
On Error Resume Next
Set xObjV = Target.Validation
If xObjV.Type = xlValidateList Then
If IsEmpty(Target.Value) Then Target.Value = "Yes"
End If
End Sub
Recently added an additional indicator, with input selection being either "D" or "W". Is there an additional criteria to be added to the above code so that a certain data validation range (i.e., E6:E23) defaults to "Yes", when deleted, and another range (i.e., D6:D23) defaults to "D" when input deleted.
I attached a mock example, if that helps.
Thanks for the help in advance!
Bookmarks