Excel--Can you select multiple selections in a drop down list?

N

Nukeman

Is there a method to multi-select from a drop down list? (Choose and display
more than one selection from the list)
 
G

Gord Dibben

If you don't wish to use a ListBox and stick with Data Validation.

Download a sample workbook from Debra Dalgleish's site.

http://www.contextures.on.ca/excelfiles.html#DV0017

Note that you can have the selections in an adjacent cell or in the same
cell.

As written it creates a comma delimited list of selected entries.


Gord Dibben MS Excel MVP
 
J

JB

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

Private Sub Worksheet_Change(ByVal Target As Range)
If Target.Address = "$C$2" And Target.Count = 1 Then
Application.EnableEvents = False
p = InStr(Target.Offset(0, -1), Target.Value)
If p > 0 Then
Target.Offset(0, -1) = Left(Target.Offset(0, -1), p - 1) & _
Mid(Target.Offset(0, -1), p + Len(Target.Value) + 1)
If Right(Target.Offset(0, -1), 1) = ":" Then
Target.Offset(0, -1) = Left(Target.Offset(0, -1), Len
(Target.Offset(0, -1)) - 1)
End If
Else
If Target.Offset(0, -1) = "" Then
Target.Offset(0, -1) = Target
Else
Target.Offset(0, -1) = Target.Offset(0, -1) & ":" &
Target.Value
End If
End If
Target.Value = Target.Offset(0, -1)
Application.EnableEvents = True
End If
End Sub

JB
http://boisgontierjacques.free.fr/
 

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