+ Reply to Thread
Results 1 to 3 of 3

Excel VBA multiple selection drop down data validation list

  1. #1
    Registered User
    Join Date
    10-11-2012
    Location
    Guildford, England
    MS-Off Ver
    Excel 2003
    Posts
    7

    Excel VBA multiple selection drop down data validation list

    Hi,

    I am hoping someone can help as I'm stuck!

    I have an Excel workbook with two sheets; one that holds all the drop down data (as named ranges) and another where I have inserted my data validation lists, using the named ranges in the first sheet. So far so good.

    Now comes the more tricky part (for me) in that I want the following to be available/happen:
    • Selecting more than one of the items on the list
    • Each additional item selected appears in the same cell, separated by a line break
    • Only possible to select an item once
    • Deselect item by clicking it again in the list


    In addition I would like a code that enables autofit + 10 every time a cell changes (so automatic/dynamic).

    I have the below code which works ok as long as I don't need to deselect anything, as that's when it goes a bit wrong;
    • If there is only 1 item selected, I'm not able to deselect it
    • If there are 2 or more items selected, and I deselect one, then the last character on the right on the top row disappears

    Please Login or Register  to view this content.
    What do I need to do to correct the code? I am guessing it could be about the LEN in the above, but I'm not clever enough to figure it out!

    Thanks,
    Elin

  2. #2
    Forum Expert
    Join Date
    02-11-2014
    Location
    New York
    MS-Off Ver
    Excel 365 (Windows)
    Posts
    5,938

    Re: Excel VBA multiple selection drop down data validation list

    Try this way....

    Please Login or Register  to view this content.
    Bernie Deitrick
    Excel MVP 2000-2010

  3. #3
    Registered User
    Join Date
    10-11-2012
    Location
    Guildford, England
    MS-Off Ver
    Excel 2003
    Posts
    7

    Re: Excel VBA multiple selection drop down data validation list

    Hi Bernie,

    That did the trick, thank you!
    Any idea how I can incorporate the autofit + 10 every time a cell changes (so automatic/dynamic) into that code as well? I appreciate I copied a version of the code where I hadn't tried (and failed) to include that, so I only mentioned it in my OP.

    Thanks,
    Elin

+ 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. Updating cells based on selection from drop down list data validation
    By excelstun in forum Excel Formulas & Functions
    Replies: 6
    Last Post: 03-18-2016, 05:11 PM
  2. Macro runs from Data Validation Drop Down List Selection
    By flindy87 in forum Excel Programming / VBA / Macros
    Replies: 7
    Last Post: 05-28-2013, 11:45 AM
  3. [SOLVED] Updating cells based on selection from drop down list data validation
    By jingles9 in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 05-24-2013, 02:57 PM
  4. Replies: 2
    Last Post: 03-13-2013, 07:35 AM
  5. Data validation drop down list with several selection
    By toblju in forum Excel Programming / VBA / Macros
    Replies: 7
    Last Post: 12-18-2012, 12:48 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