Multiple Selections from drop down list

punnu07

New Member
Joined
Apr 19, 2015
Messages
34
Hi,

How can I select multiple value from a drop down list. Below is the code which I am using for drop down list, but I am not able to find out the way to select multiple values.

Please help.

If ActiveCell<gs id="0a4e658b-78e8-49e2-a442-66e76086674a" ginger_software_uiphraseguid="40aac363-aa1f-4e60-8b89-9326c95c4c6d" class="GINGER_SOFTWARE_mark">.</gs>Value = "Workers Compensation" And ActiveCell<gs id="3527fc76-3811-4b3f-8d14-3ef76c342885" ginger_software_uiphraseguid="40aac363-aa1f-4e60-8b89-9326c95c4c6d" class="GINGER_SOFTWARE_mark">.</gs>Offset<gs id="35250419-3106-4778-9f82-72deaa22ef54" ginger_software_uiphraseguid="40aac363-aa1f-4e60-8b89-9326c95c4c6d" class="GINGER_SOFTWARE_mark">(</gs>-1, 0)<gs id="7993d28c-c591-47d0-a216-a1330a974071" ginger_software_uiphraseguid="40aac363-aa1f-4e60-8b89-9326c95c4c6d" class="GINGER_SOFTWARE_mark">.</gs>Value = "Excess" Then


With Range<gs id="80e691c2-e077-40e9-b7eb-986651747ee2" ginger_software_uiphraseguid="d1c613dc-3cc8-4520-a2b2-61dff6ec132f" class="GINGER_SOFTWARE_mark">(</gs>"B11")<gs id="ff79a7b3-4386-4c76-b51a-7535c4725802" ginger_software_uiphraseguid="d1c613dc-3cc8-4520-a2b2-61dff6ec132f" class="GINGER_SOFTWARE_mark">.</gs>Validation
<gs id="7a985f25-d878-4b90-a555-85d6b2024813" ginger_software_uiphraseguid="24d56e0f-75a9-4f3c-8819-ce8c7cf5b7da" class="GINGER_SOFTWARE_mark">.</gs>Delete
<gs id="5590716e-fc1f-4716-baf1-b375675f0fa4" ginger_software_uiphraseguid="1920332a-39de-4d79-a878-dda9c7d3b929" class="GINGER_SOFTWARE_mark">.</gs>Add Type<gs id="4dc54f70-e710-4227-9123-442aea41bb3c" ginger_software_uiphraseguid="1920332a-39de-4d79-a878-dda9c7d3b929" class="GINGER_SOFTWARE_mark">:</gs>=xlValidateList, AlertStyle<gs id="473d623f-9172-45e0-b87c-fbaf1498c558" ginger_software_uiphraseguid="1920332a-39de-4d79-a878-dda9c7d3b929" class="GINGER_SOFTWARE_mark">:</gs>=xlValidAlertStop, _
Operator<gs id="c9266ec5-f656-406b-9703-faa26f63c36b" ginger_software_uiphraseguid="42de8e0a-fff9-4238-a756-9943a7993b8f" class="GINGER_SOFTWARE_mark">:</gs>=xlBetween, Formula1<gs id="7afc2d58-b159-4dee-b3d9-8ebb535da1a6" ginger_software_uiphraseguid="42de8e0a-fff9-4238-a756-9943a7993b8f" class="GINGER_SOFTWARE_mark">:</gs>="=References<gs id="6bbc1f58-86c5-41a9-ba89-994fdbe54552" ginger_software_uiphraseguid="42de8e0a-fff9-4238-a756-9943a7993b8f" class="GINGER_SOFTWARE_mark">!</gs>DY2<gs id="5774395b-bfee-41d3-a373-71c8ad959f4e" ginger_software_uiphraseguid="42de8e0a-fff9-4238-a756-9943a7993b8f" class="GINGER_SOFTWARE_mark">:</gs>DY24"
<gs id="abf7c087-99a8-466e-9ffb-3949be841110" ginger_software_uiphraseguid="69796953-b9f1-4b8f-982e-8c537ce9145c" class="GINGER_SOFTWARE_mark">.</gs><gs id="510e0df4-1393-4c0d-b361-e632d0371597" ginger_software_uiphraseguid="69796953-b9f1-4b8f-982e-8c537ce9145c" class="GINGER_SOFTWARE_mark">InCellDropdown</gs> = True
End With
 

Excel Facts

Format cells as date
Select range and press Ctrl+Shift+3 to format cells as date. (Shift 3 is the # sign which sort of looks like a small calendar).
if you have say B3 and D5 selected what would you do with them as I can only see a paste operation

but having said that, if you had 2 identical drop downs you could select red in one and green in the other....
 
Upvote 0
Basis of those 2 values, I am populating a list in cell B11 and I want to select multiple values from this list.
 
Upvote 0
a1 dropdown = red
b1 dropdown = green
c1=a1&" "&b1

maybe

I am going offline now for 5 days I hope you get it sorted....
 
Upvote 0
Try this for your Validation list code:-
Code:
Private Sub Worksheet_Change(ByVal Target As Range)
Dim rngDV As Range
Dim oldVal As String
Dim newVal As String
If Target.count = 1 Then
On Error Resume Next
Set rngDV = Cells.SpecialCells(xlCellTypeAllValidation)
If rngDV Is Nothing Then Exit Sub
    If Not Intersect(Target, rngDV) Is Nothing Then
        Application.EnableEvents = False
            newVal = Target.Value
            Application.Undo
            oldVal = Target.Value
            Target.Value = newVal
                If Not newVal = "" Then
                    Target.Value = IIf(oldVal = "", newVal, oldVal & ", " & newVal)
                End If
    End If
Application.EnableEvents = True
End If
End Sub
 
Last edited:
Upvote 0

Forum statistics

Threads
1,223,157
Messages
6,170,419
Members
452,325
Latest member
BlahQz

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top