+ Reply to Thread
Results 1 to 12 of 12

Single cell Comma Separated Values to validation list [DIFFICULT QUESTION]

  1. #1
    Registered User
    Join Date
    04-13-2013
    Location
    Calgary, Canada
    MS-Off Ver
    Excel 2008
    Posts
    28

    Single cell Comma Separated Values to validation list [DIFFICULT QUESTION]

    Dear Excel Pros,

    I am stuck. I can't find out how to have a validation list (drop-down) from a single-cell in which values are separated by a comma.
    Let me give you the example I have.

    I have a wine list which have many categories of which

    COL A / COL B / COL C
    Wine Name / Wine Producer / Vintage

    I wrote a VBA code to look-up duplicates names and give the producers that make them. The names of the producers will be in an invis cell as Comma Separated Values.

    For example: Wine 11 is made by producer X and Wine 11 is made by producer Y. I will have X,Y in a cell which need to be in a drop-down menu when Wine 11 is selected.

    I got everything done. The only issue is to get the list. The problem is that the drop-down list shows X,Y as a single component and not as 2 drop-down components. If i were to write down X,Y in the validation list tab, it will show it as 2 components but referring to the cell doesn't. Is there ANY WAY to solve this issue?

    I would love many suggestions if possible so I can pick the most efficient one.

    Thank you.

    NOTE: I have excel 2011 so I can't use activeX.

  2. #2
    Forum Guru
    Join Date
    03-02-2006
    Location
    Los Angeles, Ca
    MS-Off Ver
    WinXP/MSO2007;Win10/MSO2016
    Posts
    12,612

    Re: Single cell Comma Separated Values to validation list [DIFFICULT QUESTION]

    To Attach a Workbook:
    1. Click on Go Advanced
    2. In the frame Attach Files you will see the button Manage Attachments
    3. Click the button.
    4. A new window will open titled Manage Attachments - Excel Forum.
    5. Click the Browse... button to locate your file for uploading.
    6. This will open a new window File Upload.
    7. Once you have located the file to upload click the Open button. This window will close.
    8. You are now back in the Manage Attachments - Excel Forum window.
    9. Click the Upload button and wait until the file has uploaded.
    10. Close the window and then click Submit
    Ben Van Johnson

  3. #3
    Valued Forum Contributor tehneXus's Avatar
    Join Date
    04-12-2013
    Location
    Hamburg, Germany
    MS-Off Ver
    Work: MS-Office 2010 32bit @ Win8 32bit / Home: MS-Office 2016 32bit @ Win10 64bit
    Posts
    944

    Re: Single cell Comma Separated Values to validation list [DIFFICULT QUESTION]

    When the list is created by vba it is possible:
    Please Login or Register  to view this content.
    with the list created in A1 and the values in 1 cell comma separated in D4
    Please use [CODE]-TAGS
    When your problem is solved mark the thread SOLVED
    If an answer has helped you please click to give reputation
    Read the FORUM RULES

  4. #4
    Registered User
    Join Date
    04-13-2013
    Location
    Calgary, Canada
    MS-Off Ver
    Excel 2008
    Posts
    28

    Re: Single cell Comma Separated Values to validation list [DIFFICULT QUESTION]

    Quote Originally Posted by tehneXus View Post
    When the list is created by vba it is possible:
    Please Login or Register  to view this content.
    with the list created in A1 and the values in 1 cell comma separated in D4


    The VBA function I use is the following.

    Please Login or Register  to view this content.
    Of course, it isn't "clean" but it gets the job done for finding values of table then deleting duplicates.

    Is it possible to alter it so it also allows me to create a validation list dynamically in the same row that the function is used? Example: If the function is used in B5, I want a validation list with the found data to be shown in C5.

    Thank you!!!!!
    Last edited by jgema; 05-31-2013 at 05:00 PM.

  5. #5
    Administrator FDibbins's Avatar
    Join Date
    12-29-2011
    Location
    Duncansville, PA USA
    MS-Off Ver
    Excel 7/10/13/16/365 (PC ver 2310)
    Posts
    52,938

    Re: Single cell Comma Separated Values to validation list [DIFFICULT QUESTION]

    seeme to me that you are making things unnecessarily difficult for yourself? If you have VBA to extract all producers of a particular wine, from a list, why not just nake a list of the producers, instead of combining them - and then having to break them apart again later?
    1. Use code tags for VBA. [code] Your Code [/code] (or use the # button)
    2. If your question is resolved, mark it SOLVED using the thread tools
    3. Click on the star if you think someone helped you

    Regards
    Ford

  6. #6
    Registered User
    Join Date
    04-13-2013
    Location
    Calgary, Canada
    MS-Off Ver
    Excel 2008
    Posts
    28

    Re: Single cell Comma Separated Values to validation list [DIFFICULT QUESTION]

    Quote Originally Posted by FDibbins View Post
    seeme to me that you are making things unnecessarily difficult for yourself? If you have VBA to extract all producers of a particular wine, from a list, why not just nake a list of the producers, instead of combining them - and then having to break them apart again later?
    I can make a list, but the issue is that I don't know how to take it and put it in a drop-down afterwards without having to output an array with the function. I'm not very good with macros (never learnt them); I use functions. With the comma separated values, I thought that by simply selecting the cell, the validation list would cascade the results but instead, it just shows the string that is found in the cell (ex: a,b is shown as a,b, instead of a 2 choices which are a and b).

    How can I solve the issue without making it so complicated? The necessary that has to be done is the following

    - Find the producers that produce the same name of wine and display them in a validation list afterwards

    WINE NAME | Producers
    (dropdown of | Display all producers
    many names) | that make the wine name
    When one is | selected
    selected, find
    all producers
    that make it
    Last edited by jgema; 05-31-2013 at 05:00 PM.

  7. #7
    Administrator FDibbins's Avatar
    Join Date
    12-29-2011
    Location
    Duncansville, PA USA
    MS-Off Ver
    Excel 7/10/13/16/365 (PC ver 2310)
    Posts
    52,938

    Re: Single cell Comma Separated Values to validation list [DIFFICULT QUESTION]

    Depending on how your data is laid out, that might be a very *simple* formula solution. can you provide a sample workbook, (all sensitive data removed), showing what data you are working with, a few examples of what your expected outcome is, and how you arrived at that
    To attach a file to your post,
    click advanced (next to quick post),
    scroll down until you see "manage file",
    click that and select "add files" (top right corner).
    click "select files" find your file, click "open" click "upload" click 'done" bottom right. click "submit reply"

    Once the upload is completed the file name will appear below the input boxes in this window.
    You can then close the window to return to the new post screen.

  8. #8
    Registered User
    Join Date
    04-13-2013
    Location
    Calgary, Canada
    MS-Off Ver
    Excel 2008
    Posts
    28

    Re: Single cell Comma Separated Values to validation list [DIFFICULT QUESTION]

    The file would take really long to "strip it down" because I have some confidential information in it. I hope its ok to try and solve it simply by description.

    I tried using the macro that was posted earlier
    Please Login or Register  to view this content.
    The problem is that when I use this, it ruins most of my other macros. I don't know why. It works though since it recreates the validation list with the string data that is in the cell, which allows it to be delimited this time. The problem is that using a single cell as validation doesn't see the comma delimitation that is inside the cell.

  9. #9
    Administrator FDibbins's Avatar
    Join Date
    12-29-2011
    Location
    Duncansville, PA USA
    MS-Off Ver
    Excel 7/10/13/16/365 (PC ver 2310)
    Posts
    52,938

    Re: Single cell Comma Separated Values to validation list [DIFFICULT QUESTION]

    Im sorry, my VBA is poor at best

  10. #10
    Valued Forum Contributor
    Join Date
    05-20-2013
    Location
    Ohio, USA
    MS-Off Ver
    Excel 2013
    Posts
    941

    Re: Single cell Comma Separated Values to validation list [DIFFICULT QUESTION]

    Better than mine

  11. #11
    Valued Forum Contributor
    Join Date
    05-20-2013
    Location
    Ohio, USA
    MS-Off Ver
    Excel 2013
    Posts
    941

    Re: Single cell Comma Separated Values to validation list [DIFFICULT QUESTION]

    Quote Originally Posted by jgema View Post
    The file would take really long to "strip it down" because I have some confidential information in it. I hope its ok to try and solve it simply by description...
    No, it is not OK

    Sounds to like you're trying to amake a dynamic drop list.

    Have a look at the tutorial at the link below and see if it resembles something close to what you want to do.

    http://excelsemipro.com/2011/05/a-dy...list-in-excel/




    And as sidebar, is the Excel version shown in your profile accurate?

  12. #12
    Registered User
    Join Date
    04-13-2013
    Location
    Calgary, Canada
    MS-Off Ver
    Excel 2008
    Posts
    28

    Re: Single cell Comma Separated Values to validation list [DIFFICULT QUESTION]

    Quote Originally Posted by tehneXus View Post
    When the list is created by vba it is possible:
    Please Login or Register  to view this content.
    with the list created in A1 and the values in 1 cell comma separated in D4


    Alright! I solved it. I incorporated the macro given with the code I attached earlier. I make it dynamic by sending the row() as an argument. I had to make sure that it was targeting the worksheet I needed otherwise i will make a validation list on every worksheet.

    Thanks peeps. Solved!

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

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