+ Reply to Thread
Results 1 to 7 of 7

How to Automatically Add to a Data Validation List

  1. #1
    Registered User
    Join Date
    05-30-2012
    Location
    Hong Kong
    MS-Off Ver
    Excel 2003
    Posts
    95

    Question How to Automatically Add to a Data Validation List

    How to Automatically Add to a Data Validation List? I know how to create a validation list and also allow user do manual entry in the cell by turning off the "Stop" error message. But how can I allow user to add new entries when they type in the drop down list while the record is not exist in my original validation list? How to make below codes work? Thanks


    Please Login or Register  to view this content.
    Last edited by Cutter; 07-31-2012 at 10:42 AM. Reason: Aligned code

  2. #2
    Forum Guru martindwilson's Avatar
    Join Date
    06-23-2007
    Location
    London,England
    MS-Off Ver
    office 97 ,2007
    Posts
    19,320

    Re: How to Automatically Add to a Data Validation List

    1.maybe you should wrap that code
    2.why do you need code to do this? a dynamic named range would do it.
    "Unless otherwise stated all my comments are directed at OP"

    Mojito connoisseur and now happily retired
    where does code go ?
    look here
    how to insert code

    how to enter array formula

    why use -- in sumproduct
    recommended reading
    wiki Mojito

    how to say no convincingly

    most important thing you need
    Martin Wilson: SPV
    and RSMBC

  3. #3
    Registered User
    Join Date
    05-30-2012
    Location
    Hong Kong
    MS-Off Ver
    Excel 2003
    Posts
    95

    Re: How to Automatically Add to a Data Validation List

    Hi Martin,

    I am not good at VBA, can you wrap for me?

    Can you also show me how to do dynamic named range? Thanks

  4. #4
    Forum Guru martindwilson's Avatar
    Join Date
    06-23-2007
    Location
    London,England
    MS-Off Ver
    office 97 ,2007
    Posts
    19,320

    Re: How to Automatically Add to a Data Validation List

    err how can i wrap the text in your post?
    also i re read your post
    i see you do need code if you wish a new entry to be added when typed,seems a bit strange tho, what if they put some rubbish like d??45&* that would be then included in the list

  5. #5
    Registered User
    Join Date
    05-30-2012
    Location
    Hong Kong
    MS-Off Ver
    Excel 2003
    Posts
    95

    Re: How to Automatically Add to a Data Validation List

    can anyone help me by providing VBA codes? Thanks!!

  6. #6
    Forum Guru martindwilson's Avatar
    Join Date
    06-23-2007
    Location
    London,England
    MS-Off Ver
    office 97 ,2007
    Posts
    19,320

    Re: How to Automatically Add to a Data Validation List

    you never wrapped your code it should look like this when you post it not one long string

    Please Login or Register  to view this content.

  7. #7
    Registered User
    Join Date
    05-30-2012
    Location
    Hong Kong
    MS-Off Ver
    Excel 2003
    Posts
    95

    Re: How to Automatically Add to a Data Validation List

    Thanks Martin. But I've got bug in my codes, can you help? Pls find my attached file. It prompts error when I type a new value in D1 cell on Main sheet.
    Attached Files Attached Files

+ 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