+ Reply to Thread
Results 1 to 19 of 19

Dependent Dropdowns - Multiple words and illegal characters

  1. #1
    Registered User
    Join Date
    06-29-2017
    Location
    United States
    MS-Off Ver
    2016
    Posts
    27

    Dependent Dropdowns - Multiple words and illegal characters

    I'm struggling to complete this second dependent dropdown which is pulling information from the first dropdown that consists of both multiple words and illegal characters, such as, "&". my first dropdown is in cell A2. How would you go about this? Thanks in advanced!

  2. #2
    Forum Guru
    Join Date
    08-05-2004
    Location
    NJ
    MS-Off Ver
    365
    Posts
    13,582

    Re: Dependent Dropdowns - Multiple words and illegal characters

    Since the name of your second dependent dropdown cannot contain those illegal characters or spaces, you need to remove them before applying the second dropdown. What specific illegal characters might the first contain? How many dependent lists will you be needing? There might be a better way to do this. Can you upload an example spreadsheet showing what you have and want to have? (Go Advanced> Manage Attachments)
    ChemistB
    My 2?

    substitute commas with semi-colons if your region settings requires
    Don't forget to mark threads as "Solved" (Edit First post>Advanced>Change Prefix)
    If I helped, Don't forget to add to my reputation (click on the little star at bottom of this post)

    Forum Rules: How to use code tags, mark a thread solved, and keep yourself out of trouble

  3. #3
    Valued Forum Contributor PFDave's Avatar
    Join Date
    05-17-2012
    Location
    Milton Keynes, England
    MS-Off Ver
    Excel 2013
    Posts
    1,067

    Re: Dependent Dropdowns - Multiple words and illegal characters

    You would most likely use substitute to remove text or illegal characters.

    Can you provide a sample workbook so we can inspect?
    Please do add reputation where you see fit, it's nice to be nice and we all enjoy a pat on the back

    Please also mark your thread as solved once it has been.

  4. #4
    Registered User
    Join Date
    06-29-2017
    Location
    United States
    MS-Off Ver
    2016
    Posts
    27

    Re: Dependent Dropdowns - Multiple words and illegal characters

    is there a secret to being able to attach an excel file?

  5. #5
    Forum Moderator AliGW's Avatar
    Join Date
    08-10-2013
    Location
    Retired in Ipswich, Suffolk, but grew up in Sawley, Derbyshire (England)
    MS-Off Ver
    MS 365 Subscription Insider Beta Channel v. 2404 (Windows 11 22H2 64-bit)
    Posts
    80,780

    Re: Dependent Dropdowns - Multiple words and illegal characters

    Unfortunately the attachment icon doesn't work at the moment, so to attach an Excel file you have to do the following: just before posting, scroll down to Go Advanced and then scroll down to Manage Attachments. Now follow the instructions at the top of that screen.
    Ali


    Enthusiastic self-taught user of MS Excel who's always learning!
    Don't forget to say "thank you" in your thread to anyone who has offered you help.
    You can reward them by clicking on * Add Reputation below their user name on the left, if you wish.

    Forum Rules (updated August 2023): please read them here.

  6. #6
    Registered User
    Join Date
    06-29-2017
    Location
    United States
    MS-Off Ver
    2016
    Posts
    27

    Re: Dependent Dropdowns - Multiple words and illegal characters

    Sample attached
    Attached Files Attached Files

  7. #7
    Registered User
    Join Date
    06-29-2017
    Location
    United States
    MS-Off Ver
    2016
    Posts
    27

    Re: Dependent Dropdowns - Multiple words and illegal characters

    AliGW, thanks for the help!
    Last edited by thestatechamp; 07-06-2017 at 10:12 AM.

  8. #8
    Forum Expert
    Join Date
    05-05-2015
    Location
    UK
    MS-Off Ver
    Microsoft Excel for Microsoft 365 MSO (Version 2402 Build 16.0.17328.20068) 64-bit
    Posts
    28,192

    Re: Dependent Dropdowns - Multiple words and illegal characters

    For each Category, create a named range:

    by Default "Frame & Mounts" will named as "Frame___Mounts" with underscore replacing "&" and " " (Spaces)

    in DV for B2: (Sub-Category)

    =LIST

    Source: =INDIRECT(SUBSTITUTE(SUBSTITUTE(A2," ","_"),"&","_"))
    Attached Files Attached Files
    Last edited by JohnTopley; 07-06-2017 at 11:58 AM.

  9. #9
    Registered User
    Join Date
    06-29-2017
    Location
    United States
    MS-Off Ver
    2016
    Posts
    27

    Re: Dependent Dropdowns - Multiple words and illegal characters

    Quote Originally Posted by JohnTopley View Post
    For each Category, create a named range:

    by Default "Frame & Mounts" will named as "Frame___Mounts" with underscore replacing "&" and " " (Spaces)

    in DV for B2: (Sub-Category)

    =LIST

    Source: =INDIRECT(SUBSTITUTE(SUBSTITUTE(A2," ","_"),"&","_"))
    Not sure if I am doing your instructions incorrectly or not, but when I do what you suggested I get a similar result as before. The sub-category list populates for "Hardware" and "Misc..." but not "Electric Generators" and "Frames & Mounts"

  10. #10
    Forum Expert
    Join Date
    05-05-2015
    Location
    UK
    MS-Off Ver
    Microsoft Excel for Microsoft 365 MSO (Version 2402 Build 16.0.17328.20068) 64-bit
    Posts
    28,192

    Re: Dependent Dropdowns - Multiple words and illegal characters

    Have you created named ranges: i only did "Frames and Mounts" in the file I posted.

  11. #11
    Forum Expert
    Join Date
    05-05-2015
    Location
    UK
    MS-Off Ver
    Microsoft Excel for Microsoft 365 MSO (Version 2402 Build 16.0.17328.20068) 64-bit
    Posts
    28,192

    Re: Dependent Dropdowns - Multiple words and illegal characters

    See attached:

    All named ranges (old ones removed)
    Attached Files Attached Files

  12. #12
    Registered User
    Join Date
    06-29-2017
    Location
    United States
    MS-Off Ver
    2016
    Posts
    27

    Re: Dependent Dropdowns - Multiple words and illegal characters

    yes I did let me give it a whirl again

  13. #13
    Registered User
    Join Date
    06-29-2017
    Location
    United States
    MS-Off Ver
    2016
    Posts
    27

    Re: Dependent Dropdowns - Multiple words and illegal characters

    Quote Originally Posted by JohnTopley View Post
    See attached:

    All named ranges (old ones removed)
    OKay I got it to work for the "Frame & Mounts" thanks for that!!! now the question is how do I edit that formula so it will work for the 'Electric Generators" category?

  14. #14
    Forum Expert
    Join Date
    05-05-2015
    Location
    UK
    MS-Off Ver
    Microsoft Excel for Microsoft 365 MSO (Version 2402 Build 16.0.17328.20068) 64-bit
    Posts
    28,192

    Re: Dependent Dropdowns - Multiple words and illegal characters

    You don't need to edit formula;: see the last attachment.

  15. #15
    Registered User
    Join Date
    06-29-2017
    Location
    United States
    MS-Off Ver
    2016
    Posts
    27

    Re: Dependent Dropdowns - Multiple words and illegal characters

    Quote Originally Posted by JohnTopley View Post
    See attached:

    All named ranges (old ones removed)
    Perfect, I didn't notice you posted this before my last response... Will I have to edit the formula at all if I was to add a new category which had a "-" or would the original formula be enough? For example; "Roll-Off"
    Last edited by thestatechamp; 07-06-2017 at 12:36 PM.

  16. #16
    Forum Expert
    Join Date
    05-05-2015
    Location
    UK
    MS-Off Ver
    Microsoft Excel for Microsoft 365 MSO (Version 2402 Build 16.0.17328.20068) 64-bit
    Posts
    28,192

    Re: Dependent Dropdowns - Multiple words and illegal characters

    If you let Excel create the default names then "-" will automatically be replaced by "_".

    Click on cell e.g. "Double-Dutch", then "Formulas"==>"Define Name" and should default to "Double_Dutch"

  17. #17
    Registered User
    Join Date
    06-29-2017
    Location
    United States
    MS-Off Ver
    2016
    Posts
    27

    Re: Dependent Dropdowns - Multiple words and illegal characters

    Quote Originally Posted by JohnTopley View Post
    If you let Excel create the default names then "-" will automatically be replaced by "_".

    Click on cell e.g. "Double-Dutch", then "Formulas"==>"Define Name" and should default to "Double_Dutch"
    Sorry but I need the sub-categories for "Double-Dutch" to populate. Which when I have tried hasn't happened. Excel wont let me rename the range Double_Dutch
    Last edited by thestatechamp; 07-06-2017 at 12:52 PM.

  18. #18
    Registered User
    Join Date
    06-29-2017
    Location
    United States
    MS-Off Ver
    2016
    Posts
    27

    Re: Dependent Dropdowns - Multiple words and illegal characters

    Quote Originally Posted by thestatechamp View Post
    Sorry but I need the sub-categories for "Double-Dutch" to populate. Which when I have tried hasn't happened. Excel wont let me rename the range Double_Dutch
    I think I figured out a solution, while it may not be the best.. I entered the following as the source for the data validation:

    =INDIRECT(SUBSTITUTE(SUBSTITUTE(SUBSTITUTE(A2," ","_"),"&","_"),"-","_"))

    I appreciate your help a lot!

  19. #19
    Forum Expert
    Join Date
    05-05-2015
    Location
    UK
    MS-Off Ver
    Microsoft Excel for Microsoft 365 MSO (Version 2402 Build 16.0.17328.20068) 64-bit
    Posts
    28,192

    Re: Dependent Dropdowns - Multiple words and illegal characters

    If that takes care of your original question, please select Thread Tools from the menu link above and mark this thread as SOLVED. Thanks.

+ 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. multiple dynamic dependent dropdowns
    By 7WiZARD in forum Excel Programming / VBA / Macros
    Replies: 6
    Last Post: 07-01-2016, 06:51 AM
  2. [SOLVED] Dependant list with illegal characters and multiple words
    By bravobravoau in forum Excel General
    Replies: 8
    Last Post: 01-29-2014, 09:31 AM
  3. [SOLVED] Dependent Dropdowns, clearing dependent value when parent value changes
    By ptmald in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 10-14-2013, 01:52 PM
  4. Making third Validation list that is dependent in column A&B (with illegal characters)
    By Elainefish in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 04-09-2013, 10:21 AM
  5. Replies: 0
    Last Post: 01-11-2012, 11:07 PM
  6. Dependent data validation with illegal characters
    By Brynut in forum Excel General
    Replies: 2
    Last Post: 11-05-2011, 05:33 AM
  7. remove all illegal characters
    By mtrant in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 08-18-2008, 04:46 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