Dropdown List That Accepts Other User Input

G

GEdwards

I cannot find if there is a way to have a dropdown list that contains
pre-defined data validation entries and also allow a user to input their own.

Is there a way to do this in Excel?
 
G

GEdwards

Thanks Gord. This does the work I need and I have also bookmarked the site
you suggested for future reference.
 
×

מיכ×ל (מיקי) ×בידן

With all due respect - when the OP asks
:
"...and also allow a user to input their own" - I, and probably 99% of the
supporters in this D.G., would guess he DOES NOT want and/or need ANY KIND of
alert about an "Illegal Value..."
Micky
 
J

JB

http://boisgontierjacques.free.fr/fichiers/DonneesValidation/DV_AjoutListe.xls

Private Sub Worksheet_Change(ByVal Target As Range)
If Target.Column = 2 And Target.Count = 1 Then
If Target <> "" Then
If IsError(Application.Match(Target.Value, [Liste], 0)) Then
If MsgBox("Add?", vbYesNo) = vbYes Then
[Liste].End(xlDown).Offset(1, 0) = Target.Value
Sheets("Liste").[Liste].Sort key1:=Sheets("Liste").Range("A2")
Else
Application.Undo
End If
End If
End If
End If
End Sub

Named range:
=Offset(Liste!$A$2,,,CountA(Liste!$A:$A)-1)

JB
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top