Results 1 to 2 of 2

Help with making a drop down list in many cells that allows me to select multiple options

Threaded View

  1. #1
    Registered User
    Join Date
    09-03-2016
    Location
    Edinburgh, Scotland
    MS-Off Ver
    2013
    Posts
    1

    Help with making a drop down list in many cells that allows me to select multiple options

    I'm a translator trying to track and classify my work project. I want to create a column in which each cell has a list of subject categories (Legal, Business, Education etc) and I want it to be possible to be able to pick multiple subject categories. There are a number of "how to" guides online that give code but I have tried entering it where they tell me to and it's not having the desired effect. I have made the drop down list in one cell already. I just need to apply it to all cells in the same column (to infinity as I will keep adding jobs over the course of my career) and I need it to let me select multiple subject categories (I want to class a supplier contract under both business and legal for example.

    I tried using this code ,changing only $C$2 to the box in my spreadsheet already containing the list ($K$2) This didn't work and I'm not sure why (although I have no coding background - I'm just trying to teach myself the basics: Thanks!

    Private Sub Worksheet_Change(ByVal Target As Range)
    
    'Code by Sumit Bansal from www.trumpexcel.com
    ' To Select Multiple Items from a Drop Down List in Excel
    
    Dim Oldvalue As String
    Dim Newvalue As String
    
    On Error GoTo Exitsub
    If Target.Address = "$C$2" Then
        If Target.SpecialCells(xlCellTypeAllValidation) Is Nothing Then
        GoTo Exitsub
        Else: If Target.Value = "" Then GoTo Exitsub Else
            Application.EnableEvents = False
            Newvalue = Target.Value
            Application.Undo
            Oldvalue = Target.Value
            If Oldvalue = "" Then
                Target.Value = Newvalue
            Else
                Target.Value = Oldvalue & ", " & Newvalue
            End If
        End If
    End If
    Application.EnableEvents = True
    
    Exitsub:
    Application.EnableEvents = True
    
    End Sub
    Last edited by jeffreybrown; 09-03-2016 at 06:55 PM. Reason: Please use code tags when posting code

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. Replies: 8
    Last Post: 08-11-2016, 11:07 AM
  2. Replies: 3
    Last Post: 07-08-2016, 07:04 PM
  3. Select multiple options from drop down list
    By forestview in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 06-26-2016, 01:42 PM
  4. Select multiple options from drop down list
    By nsprasad in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 09-29-2015, 05:30 AM
  5. [SOLVED] Printing Multiple Options from a Drop-Down List
    By JayPear in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 10-08-2014, 10:07 PM
  6. [SOLVED] Making Drop Down List Show (Select One) in all cells
    By bouncingbudha in forum Excel General
    Replies: 1
    Last Post: 03-27-2014, 01:50 AM

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