+ Reply to Thread
Results 1 to 7 of 7

Multiple values in same cell from Dropdown

  1. #1
    Registered User
    Join Date
    07-15-2016
    Location
    Germany
    MS-Off Ver
    at Mac version 15.24
    Posts
    34

    Multiple values in same cell from Dropdown

    Hello,

    I am trying to create a dropdown where I can select multiple values in the same cell. The values could be big in number.
    I have a Macro to do this but it is super slow and keeps crashing my excel sheet.

    Could anyone help me fixing this code or just provide new code if you guys have any. I am using MAC Office 2016

    Below is the code which I am using but it crashes the excel sheet...

    Private Sub Worksheet_Change(ByVal Target As Range)

    Dim Oldvalue As String
    Dim Newvalue As String

    On Error GoTo Exitsub
    If Target.Column > 3 And Target.Column < 9 Then
    If Target.SpecialCells(xlCellTypeAllValidation) Is Nothing Then
    GoTo Exitsub
    Else: If Target.Value = "" Then GoTo Exitsub Else
    Application.EnableEvents = True
    Newvalue = Target.Value
    Application.Undo
    Oldvalue = Target.Value
    If Oldvalue = "" Then
    Target.Value = Newvalue
    Else
    If InStr(1, Oldvalue, Newvalue) = 0 Then
    Target.Value = Oldvalue & ", " & Newvalue
    Else
    Target.Value = Oldvalue
    End If
    End If
    End If
    End If
    Application.EnableEvents = True

    Exitsub:
    Application.EnableEvents = True

    End Sub

  2. #2
    Forum Moderator Glenn Kennedy's Avatar
    Join Date
    07-08-2012
    Location
    Digital Nomad... occasionally based in Ireland.
    MS-Off Ver
    O365 (PC) V 2403
    Posts
    44,064

    Re: Multiple values in same cell from Dropdown

    How do you want the multiple values to be separated?
    Glenn




    None of us get paid for helping you... we do this for fun. So DON'T FORGET to say "Thank You" to all who have freely given some of their time to help YOU.

    Temporary addition of accented to illustrate ongoing problem to the TT: L? fh?ile P?draig sona dhaoibh

  3. #3
    Forum Expert
    Join Date
    12-11-2011
    Location
    Netherlands
    MS-Off Ver
    office 365
    Posts
    3,293

    Re: Multiple values in same cell from Dropdown

    I had this file in my archive.
    May you can use this?
    I don't know if it will work with MAC
    Willem
    English is not my native language sorry for errors
    Please correct me if I'm completely wrong

  4. #4
    Registered User
    Join Date
    07-15-2016
    Location
    Germany
    MS-Off Ver
    at Mac version 15.24
    Posts
    34

    Re: Multiple values in same cell from Dropdown

    hi Glenn,

    I want them to be separated by a comma

    thanks
    Kim

  5. #5
    Forum Moderator Glenn Kennedy's Avatar
    Join Date
    07-08-2012
    Location
    Digital Nomad... occasionally based in Ireland.
    MS-Off Ver
    O365 (PC) V 2403
    Posts
    44,064

    Re: Multiple values in same cell from Dropdown

    Try this (set up for column C dropdown. Don't know if there are Mac compatability issues.

    Please Login or Register  to view this content.

  6. #6
    Registered User
    Join Date
    07-15-2016
    Location
    Germany
    MS-Off Ver
    at Mac version 15.24
    Posts
    34

    Re: Multiple values in same cell from Dropdown

    Thanks for the code Glenn.

    Exactly what I needed. Worked very well.

  7. #7
    Forum Moderator Glenn Kennedy's Avatar
    Join Date
    07-08-2012
    Location
    Digital Nomad... occasionally based in Ireland.
    MS-Off Ver
    O365 (PC) V 2403
    Posts
    44,064

    Re: Multiple values in same cell from Dropdown

    You're welcome and thanks for the Rep.

+ 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. Dropdown list depened on multiple values
    By thup_98 in forum Excel General
    Replies: 1
    Last Post: 02-26-2016, 05:12 AM
  2. [SOLVED] Dropdown list returning multiple values
    By collmehank in forum Excel Formulas & Functions
    Replies: 8
    Last Post: 05-11-2015, 09:55 AM
  3. [SOLVED] Select multiple values from dropdown list
    By DiegoL in forum Excel General
    Replies: 3
    Last Post: 12-10-2014, 06:06 AM
  4. [SOLVED] Dropdown list with multiple values
    By Nadoor1970 in forum Excel General
    Replies: 4
    Last Post: 09-29-2013, 10:07 AM
  5. Returning Multiple Values as Dropdown List
    By Dahlia in forum Excel General
    Replies: 13
    Last Post: 04-29-2013, 05:27 AM
  6. Dropdown Box Returning Multiple Values
    By roycey in forum Excel Formulas & Functions
    Replies: 4
    Last Post: 04-26-2013, 10:55 AM
  7. Macro and select multiple values from Dropdown
    By gbjtlw in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 05-14-2008, 01:07 PM

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