+ Reply to Thread
Results 1 to 13 of 13

Automated List using Data Validation

  1. #1
    Registered User
    Join Date
    05-27-2016
    Location
    JAKARTA
    MS-Off Ver
    2013
    Posts
    25

    Question Automated List using Data Validation

    I have problem using list in Data Validation since its not automatically listed.
    I want to use automated list, for example (in the attachment) if the country is Trinidad & Tobago, the city list automatically only shown Arnos Vale and Arouca, instead of showing Washington, New York, London, and other cities.

    Thanks before.
    Attached Files Attached Files

  2. #2
    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,926

    Re: Automated List using Data Validation

    Attached is a sample file I put together that shows how to do what you want. It uses names ranges for each level and sub-level, and also uses INDIRECT() to pull in the results
    Attached Files Attached Files
    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

  3. #3
    Registered User
    Join Date
    05-27-2016
    Location
    JAKARTA
    MS-Off Ver
    2013
    Posts
    25

    Re: Automated List using Data Validation

    Quote Originally Posted by FDibbins View Post
    Attached is a sample file I put together that shows how to do what you want. It uses names ranges for each level and sub-level, and also uses INDIRECT() to pull in the results
    If i want using "&" ??

  4. #4
    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,926

    Re: Automated List using Data Validation

    What do you mean?

  5. #5
    Registered User
    Join Date
    05-27-2016
    Location
    JAKARTA
    MS-Off Ver
    2013
    Posts
    25

    Re: Automated List using Data Validation

    Like Trinidad & Tobago.
    How to use substitute on them??

  6. #6
    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,926

    Re: Automated List using Data Validation

    You mean, if they swap them around?

  7. #7
    Registered User
    Join Date
    05-27-2016
    Location
    JAKARTA
    MS-Off Ver
    2013
    Posts
    25

    Re: Automated List using Data Validation

    I mean how to use both " " (space) and "&".
    The substitute only replace " " into "" right?
    What if in some category i want to have "&" as well, because i can't use "&" in define name

  8. #8
    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,926

    Re: Automated List using Data Validation

    The substitute only replace " " into "" right?
    No, range names dont allow the use of a space in the name, so I am replacing (just) the space with underscore _

  9. #9
    Registered User
    Join Date
    05-27-2016
    Location
    JAKARTA
    MS-Off Ver
    2013
    Posts
    25

    Re: Automated List using Data Validation

    Yes, i get how to get it done with your example.
    the next question is if my category is "Mammals &" instead of "Mammals yes".
    Can i change the "yes" into "&"?

  10. #10
    Registered User
    Join Date
    05-27-2016
    Location
    JAKARTA
    MS-Off Ver
    2013
    Posts
    25

    Re: Automated List using Data Validation

    Repost, deleted

  11. #11
    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,926

    Re: Automated List using Data Validation

    No, range names wont accept special characters. Seeing as this will be a DD and wont need typing, can you use AND instead of &? This will simplify it a lot

  12. #12
    Registered User
    Join Date
    05-27-2016
    Location
    JAKARTA
    MS-Off Ver
    2013
    Posts
    25

    Re: Automated List using Data Validation

    Yes, i can change it into "AND", i'm just curious.
    Maybe it can using INDIRECT(VLOOKUP(.....)) , but i figure it will a lot complicated.

    THANK YOU SO MUCH FDibbins.

  13. #13
    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,926

    Re: Automated List using Data Validation

    Im happy to help

    I always try and keep things to their simplest level. yes, there are probably a few work-around so you could use ? but really, using AND would be teh exact same thing, and it is not being typed anyway

+ 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. Replies: 3
    Last Post: 06-04-2015, 02:27 PM
  2. [SOLVED] Data Validation: How to clear/delete the content of the cell and not Data Validation List?
    By lukelucky in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 01-07-2015, 09:42 AM
  3. Replies: 4
    Last Post: 12-19-2013, 10:44 AM
  4. Adding Date Data Validation to cells with List Data Validation
    By biggtyme in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 09-03-2013, 09:47 AM
  5. Generating an automated list from given data.
    By Mujahidmir in forum Excel Formulas & Functions
    Replies: 0
    Last Post: 12-13-2012, 01:42 AM
  6. Replies: 3
    Last Post: 04-11-2011, 05:52 PM
  7. Replies: 8
    Last Post: 08-18-2008, 07:29 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