Dynamic Data Validation
Data Validation is a nice feature for restricting cell inputs, but sometimes you want the user to be able to add an item to the DV list. With the Worksheet_Change event and a dynamic range name, you can allow the user to do just that.
First, set up a dynamic named range for your list

Note the first item in the list is “(new entry)”. This will be used to trigger the macro that allows the user to add to the list. Next, create the data validation

Finally, create the code in the Change event to catch when the user selects (new entry).
Application.EnableEvents = False
Dim vResp As Variant
Dim sTestValid As String
'Make sure the cell has validation
On Error Resume Next
sTestValid = Target.Validation.Formula1
On Error GoTo 0
'If the validation refers to our list and the user
'selected New entry
If sTestValid = " = ValList" Then
If Target.Value = "(new entry)" Then
'Get the new value from the user
vResp = InputBox("Enter new item", "New Entry")
'If the user didn’t click cancel
If Len(vResp) > 0 Then
'add the new entry to just below ValList
With Me.Range("ValList")
.Cells(.Cells.Count + 1).Value = vResp
End With
'Set the cell to the new entry
Target.Value = vResp
Else
'If the user cancelled, clear the cell
Target.ClearContents
End If
End If
End If
Application.EnableEvents = True
End Sub
You can beef up the code to make sure the user is entering something reasonable. The code can also be modified for use with a hard-coded list, as opposed to a range. But I have to leave something for you to experiment with.



