A Microsoft Office (Excel, Word) forum. OfficeFrustration

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

Go Back   Home » OfficeFrustration forum » Microsoft Excel » General Discussion
Site Map Home Register Authors List Search Today's Posts Mark Forums Read  

Multi-select from a dropdown list



 
 
Thread Tools Display Modes
  #1  
Old April 7th, 2010, 01:34 PM posted to microsoft.public.excel.misc
PaulaG
external usenet poster
 
Posts: 1
Default Multi-select from a dropdown list

I have a dropdown list but wish to select more than one item from it - is
this possible?
  #2  
Old April 7th, 2010, 02:00 PM posted to microsoft.public.excel.misc
Dave Peterson
external usenet poster
 
Posts: 19,791
Default Multi-select from a dropdown list

Not really.

Could you replace it with a listbox -- and allow multiple selections?

PaulaG wrote:

I have a dropdown list but wish to select more than one item from it - is
this possible?


--

Dave Peterson
  #3  
Old April 7th, 2010, 03:03 PM posted to microsoft.public.excel.misc
Roger Govier[_8_]
external usenet poster
 
Posts: 338
Default Multi-select from a dropdown list

Hi Paula

Only with code

This code (not written by me) will allow you to make multiple selections
from a data validation cell, and will insert a comma between each
selected value

Private Sub Worksheet_Change(ByVal Target As Range)
Dim rngDV As Range
Dim oldVal As String, newVal As String
Dim tr As Long
tr = Target.Row
If Target.Count 1 Then GoTo exitHandler

On Error Resume Next
Set rngDV = Cells.SpecialCells(xlCellTypeAllValidation)
On Error GoTo exitHandler

If rngDV Is Nothing Then GoTo exitHandler

If Intersect(Target, rngDV) Is Nothing Then
'do nothing
Else
Application.EnableEvents = False
newVal = Target.Value
Application.Undo
oldVal = Target.Value
Target.Value = newVal
If oldVal = "" Then
'do nothing
Else
If newVal = "" Then
'do nothing
Else
Target.Value = oldVal _
& ", " & newVal
End If
End If
End If

exitHandler:
Application.EnableEvents = True
End Sub

It is event code so you need to copy it to the sheet where you have your
cells with Data Validation.

Copy code above
Right click on sheet tabView Code
Paste code into white pane that appears
Alt+F11 to return to Excel.

--
Regards
Roger Govier

PaulaG wrote:
I have a dropdown list but wish to select more than one item from it - is
this possible?

  #4  
Old April 7th, 2010, 04:43 PM posted to microsoft.public.excel.misc
Gord Dibben
external usenet poster
 
Posts: 20,252
Default Multi-select from a dropdown list

Multiselect from a DV dropdown is possible using VBA.

See Debra Dalgleish's site for a downloadable sample workbook with event
code.

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

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


Gord Dibben MS Excel MVP

On Wed, 7 Apr 2010 05:34:01 -0700, PaulaG
wrote:

I have a dropdown list but wish to select more than one item from it - is
this possible?


  #5  
Old April 7th, 2010, 06:36 PM posted to microsoft.public.excel.misc
JB
external usenet poster
 
Posts: 115
Default Multi-select from a dropdown list


http://boisgontierjacques.free.fr/fi...Successifs.xls

JB
http://boisgontierjacques.free.fr/

On 7 avr, 15:00, Dave Peterson wrote:
Not really.

Could you replace it with a listbox -- and allow multiple selections?

PaulaG wrote:

I have a dropdown list but wish to select more than one item from it - is
this possible?


--

Dave Peterson


  #6  
Old April 7th, 2010, 06:52 PM posted to microsoft.public.excel.misc
Dave Peterson
external usenet poster
 
Posts: 19,791
Default Multi-select from a dropdown list

I don't open unsolicited workbooks.



JB wrote:

http://boisgontierjacques.free.fr/fi...Successifs.xls

JB
http://boisgontierjacques.free.fr/

On 7 avr, 15:00, Dave Peterson wrote:
Not really.

Could you replace it with a listbox -- and allow multiple selections?

PaulaG wrote:

I have a dropdown list but wish to select more than one item from it - is
this possible?


--

Dave Peterson


--

Dave Peterson
 




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Forum Jump


All times are GMT +1. The time now is 11:54 AM.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 OfficeFrustration.
The comments are property of their posters.