+ Reply to Thread
Results 1 to 3 of 3

Multiple Drop Down lists which allow multiple selections

  1. #1
    Registered User
    Join Date
    07-14-2017
    Location
    Brighton, UK
    MS-Off Ver
    2016
    Posts
    2

    Lightbulb Multiple Drop Down lists which allow multiple selections

    Forgive me - I am a total beginner at this stuff.


    The issue is that I have several drop down lists where I want to be able to select multiple options.
    I have successfully done this for one of the lists.

    But - I am unable to re-define the range - atm it is working on Column 4 - I want to change this to allow the drop down lists at 4,5,7,8,9 all to have drop down lists able to select multiple options.

    The following is the VBA I used.

    Private Sub Worksheet_Change(ByVal Target As Range)
    ' Developed by Contextures Inc.
    ' www.contextures.com
    Dim rngDV As Range
    Dim oldVal As String
    Dim newVal As String
    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 Target.Column = "4" Then
    If oldVal = "" Then
    'do nothing
    Else
    If newVal = "" Then
    'do nothing
    Else
    Target.Value = oldVal _
    & ", " & newVal
    ' NOTE: you can use a line break,
    ' instead of a comma
    ' Target.Value = oldVal _
    ' & Chr(10) & newVal
    End If
    End If
    End If
    End If

    exitHandler:
    Application.EnableEvents = True
    End Sub


    Is anyone able to help??? Please!

  2. #2
    Forum Guru
    Join Date
    07-25-2011
    Location
    Florida
    MS-Off Ver
    Excel 2003
    Posts
    9,643

    Re: Multiple Drop Down lists which allow multiple selections

    Please Login or Register  to view this content.
    Surround your VBA code with CODE tags e.g.;
    [CODE]your VBA code here[/CODE]
    The # button in the forum editor will apply CODE tags around your selected text.

  3. #3
    Registered User
    Join Date
    07-14-2017
    Location
    Brighton, UK
    MS-Off Ver
    2016
    Posts
    2

    Re: Multiple Drop Down lists which allow multiple selections

    Thank you so much!
    [Resolved]

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. [SOLVED] Multiple Selections from Lists
    By Nuccio92 in forum Excel General
    Replies: 5
    Last Post: 11-08-2016, 08:31 PM
  2. multiple selections from drop down list
    By Andyroo in forum Excel Formulas & Functions
    Replies: 5
    Last Post: 10-09-2013, 11:24 AM
  3. Multiple Drop Down Selections Leads To...
    By exs120 in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 09-21-2011, 04:46 PM
  4. Multiple drop down selections
    By tortuga32 in forum Excel General
    Replies: 0
    Last Post: 02-04-2010, 08:28 PM
  5. [SOLVED] Making multiple selections from Excel drop down lists
    By Andyroo in forum Excel Formulas & Functions
    Replies: 7
    Last Post: 08-16-2006, 10:25 PM
  6. [SOLVED] Can a drop-down have multiple selections?
    By Julian in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 01-31-2006, 09:10 PM

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1