# Microsoft Office Application Help - Excel Help forum > Excel Formulas & Functions >  > [SOLVED] Can List or Combo Box have multiple selections?

## nutmeg@questions.com

Hello, I am an excel user but never this before; I want to allow the users to
be able to pick multiple items from a drop down list.  I have tried using a
form combo box but needed to put more than one on the sheet to get the
results.  Can this be done with a 'list box' and if so, how.  I have tried by
putting one one and selecting 'multi' but it won't select properly.

Any help gratefully accepted.

Thank you,
IEJ

----------


## Max

"nutmeg@questions.com" wrote:
> .. allow the users to be able to pick multiple items
> from a drop down list.  I have tried using a form combo box
> but needed to put more than one on the sheet to get the
> results.  Can this be done with a 'list box' and if so, how.
> I have tried by putting one one and selecting 'multi'
> but it won't select properly.

Some googled thoughts which may help ..:

By Debra Dalgleish:

" .. You can do this with programming.
There's a sample file here:
http://www.contextures.com/excelfiles.html
Under Data Validation,
look for 'Select Multiple Items from Dropdown List' "

By Dave Peterson:

> I created a list box, and want to allow a user to select multiple items
within the cell.  Is there a way to do that?

... Is the listbox on a worksheet?

If yes, is the listbox from the Forms toolbar?
Then rightclick on the listbox and choose:  format control
Then on the Control tab, choose Multi in the selection type frame.

If the listbox is from the control toolbox toolbar, then
go into design mode (another icon on that control toolbox toolbar
Rightclick on the listbox, choose properties
Change the .multiselect property to 1 - fmMultiSelectMulti

By Ton Teuns:

> .. created a list box which enables multiple selections.
want to know how you can set up a cell link to return the selected values.
This is easily done on a single selection list box by using cell link, but I
understand that you have to program a command in VBA to do this for a
multiple selection list box.

This code is an example of how to do the job.

Sub Tester()
Dim i As Integer, li As Integer

li = 1
With Listbox1
For li = 0 To .ListCount - 1
If .Selected(li) = True Then
Cells(1, 1).Offset(0, i) = .List(li)
i = i + 1
End If
Next li
End With
End Sub

--
Max
Singapore
http://savefile.com/projects/236895
xdemechanik
---

----------


## nutmeg@questions.com

Thank you, but I think I may be searching for something that can't be done, I
don't know.  What I am trying to achieve is similar to a combox box
selection, it drops down and is linked to a value field beside it i.e.

Combox Box Selector        Quantity Picked       Price of Item        Total
Fitting No 1                              2                       10.00
20.00
Fitting No 2                              1                         3.00
3.00

I can get this process to work using a combo box (form) but in order to get
multiple selections so that they can pick another field, I could only figure
out one way to achieve this and that was add another combox box which seems
to completely defeat the purpose.

I checked the contexture.com/excelfiles.html example, tried them all,
selections worked but didn't move to the column shown.  Has anyone else been
able to get it to work?

Maybe another question, the Form List Box appears to work the same as the
combo box using the Input Range and cell link, with Multi chosen.  Then the
value field using Function Arguments needs to have the same vlookup value and
table array.  There seems to be something missing here.  Even though I have
chosen Multi and the Lookup value shows '= any', it still gives me an #N/A.
Is it possible to pick a specific from a list box and link that specific to
the value field.  There are 3 items in the list box all with a value in the
third column i.e.
Column A      B                      C                        E
Line No.   Fitting Descr       Value                   Lookup
1             Fitting No 1         1.00
2
3
etc.
I want to pick Fitting No 1 and get a value, Fitting No 2 and get a value etc.

Any further help gratefully accepted.


"Max" wrote:

> "nutmeg@questions.com" wrote:
> > .. allow the users to be able to pick multiple items
> > from a drop down list.  I have tried using a form combo box
> > but needed to put more than one on the sheet to get the
> > results.  Can this be done with a 'list box' and if so, how.
> > I have tried by putting one one and selecting 'multi'
> > but it won't select properly.
>
> Some googled thoughts which may help ..:
>
> By Debra Dalgleish:
>
> " .. You can do this with programming.
> There's a sample file here:
>    http://www.contextures.com/excelfiles.html
> Under Data Validation,
> look for 'Select Multiple Items from Dropdown List' "
>
> By Dave Peterson:
>
> > I created a list box, and want to allow a user to select multiple items
> within the cell.  Is there a way to do that?
>
> ... Is the listbox on a worksheet?
>
> If yes, is the listbox from the Forms toolbar?
> Then rightclick on the listbox and choose:  format control
> Then on the Control tab, choose Multi in the selection type frame.
>
> If the listbox is from the control toolbox toolbar, then
> go into design mode (another icon on that control toolbox toolbar
> Rightclick on the listbox, choose properties
> Change the .multiselect property to 1 - fmMultiSelectMulti
>
> By Ton Teuns:
>
> > .. created a list box which enables multiple selections.
> want to know how you can set up a cell link to return the selected values.
> This is easily done on a single selection list box by using cell link, but I
> understand that you have to program a command in VBA to do this for a
> multiple selection list box.
>
> This code is an example of how to do the job.
>
> Sub Tester()
>   Dim i As Integer, li As Integer
>
>   li = 1
>   With Listbox1
>     For li = 0 To .ListCount - 1
>       If .Selected(li) = True Then
>         Cells(1, 1).Offset(0, i) = .List(li)
>         i = i + 1
>       End If
>     Next li
>   End With
> End Sub
>
> --
> Max
> Singapore
> http://savefile.com/projects/236895
> xdemechanik
> ---
>
>
>

----------


## nutmeg@questions.com

Thank you, but I think I may be searching for something that can't be done, I
don't know.  What I am trying to achieve is similar to a combox box
selection, it drops down and is linked to a value field beside it i.e.

Combox Box Selector        Quantity Picked       Price of Item        Total
Fitting No 1                              2                       10.00
20.00
Fitting No 2                              1                         3.00
3.00

I can get this process to work using a combo box (form) but in order to get
multiple selections so that they can pick another field, I could only figure
out one way to achieve this and that was add another combox box which seems
to completely defeat the purpose.

I checked the contexture.com/excelfiles.html example, tried them all,
selections worked but didn't move to the column shown.  Has anyone else been
able to get it to work?

Maybe another question, the Form List Box appears to work the same as the
combo box using the Input Range and cell link, with Multi chosen.  Then the
value field using Function Arguments needs to have the same vlookup value and
table array.  There seems to be something missing here.  Even though I have
chosen Multi and the Lookup value shows '= any', it still gives me an #N/A.
Is it possible to pick a specific from a list box and link that specific to
the value field.  There are 3 items in the list box all with a value in the
third column i.e.
Column A      B                      C                        E
Line No.   Fitting Descr       Value                   Lookup
1             Fitting No 1         1.00
2
3
etc.
I want to pick Fitting No 1 and get a value, Fitting No 2 and get a value etc.

Any further help gratefully accepted.


"Max" wrote:

> "nutmeg@questions.com" wrote:
> > .. allow the users to be able to pick multiple items
> > from a drop down list.  I have tried using a form combo box
> > but needed to put more than one on the sheet to get the
> > results.  Can this be done with a 'list box' and if so, how.
> > I have tried by putting one one and selecting 'multi'
> > but it won't select properly.
>
> Some googled thoughts which may help ..:
>
> By Debra Dalgleish:
>
> " .. You can do this with programming.
> There's a sample file here:
>    http://www.contextures.com/excelfiles.html
> Under Data Validation,
> look for 'Select Multiple Items from Dropdown List' "
>
> By Dave Peterson:
>
> > I created a list box, and want to allow a user to select multiple items
> within the cell.  Is there a way to do that?
>
> ... Is the listbox on a worksheet?
>
> If yes, is the listbox from the Forms toolbar?
> Then rightclick on the listbox and choose:  format control
> Then on the Control tab, choose Multi in the selection type frame.
>
> If the listbox is from the control toolbox toolbar, then
> go into design mode (another icon on that control toolbox toolbar
> Rightclick on the listbox, choose properties
> Change the .multiselect property to 1 - fmMultiSelectMulti
>
> By Ton Teuns:
>
> > .. created a list box which enables multiple selections.
> want to know how you can set up a cell link to return the selected values.
> This is easily done on a single selection list box by using cell link, but I
> understand that you have to program a command in VBA to do this for a
> multiple selection list box.
>
> This code is an example of how to do the job.
>
> Sub Tester()
>   Dim i As Integer, li As Integer
>
>   li = 1
>   With Listbox1
>     For li = 0 To .ListCount - 1
>       If .Selected(li) = True Then
>         Cells(1, 1).Offset(0, i) = .List(li)
>         i = i + 1
>       End If
>     Next li
>   End With
> End Sub
>
> --
> Max
> Singapore
> http://savefile.com/projects/236895
> xdemechanik
> ---
>
>
>

----------

