+ Reply to Thread
Results 1 to 11 of 11

Another Dependent Data Validation Combobox

  1. #1
    Registered User
    Join Date
    04-06-2009
    Location
    Bandung
    MS-Off Ver
    Excel 2003 & 2007
    Posts
    16

    Another Dependent Data Validation Combobox

    Hi everyone,

    I'm still curious about the sample from Contextures, http://www.contextures.com/excelfiles.html (DV0032 - Dependent Data Validation Combobox)

    I have made a modification from its file (sample is attached). First drop list can be autocomplete, but the second cannot. For the comparing, I made row 2 in ValidationSample sheet is my modification, and row 3 is the original.

    Can you guys help me find the solution? thank you before..
    Attached Files Attached Files
    Last edited by blacque; 05-09-2009 at 02:46 AM.

  2. #2
    Forum Expert NBVC's Avatar
    Join Date
    12-06-2006
    Location
    Mississauga, CANADA
    MS-Off Ver
    2003:2010
    Posts
    34,898

    Re: Another Dependent Data Validation Combobox

    I'm not sure if/how you changed the code.. If I paste back the code that was given in the contextures site.. it works for me.
    Attached Files Attached Files
    Where there is a will there are many ways.

    If you are happy with the results, please add to the contributor's reputation by clicking the reputation icon (star icon) below left corner

    Please also mark the thread as Solved once it is solved. Check the FAQ's to see how.

  3. #3
    Registered User
    Join Date
    04-06-2009
    Location
    Bandung
    MS-Off Ver
    Excel 2003 & 2007
    Posts
    16

    Re: Another Dependent Data Validation Combobox

    Hmm.. that's strange..
    Btw, i have a screenshot to be analyzed..

    Hope you can help me further..

    FYI, I use MS Excel 2003

    thanks
    Attached Images Attached Images

  4. #4
    Forum Expert NBVC's Avatar
    Join Date
    12-06-2006
    Location
    Mississauga, CANADA
    MS-Off Ver
    2003:2010
    Posts
    34,898

    Re: Another Dependent Data Validation Combobox

    I'm not sure.. I am not enough of a VBA expert to tell you how to change the Contextures supplied code to accomodate Indirect references to lists...

    If you enter the list name directly..it works.. see for example cell C3.. I change data validation formula to =Finance and it works.. but if you indirectly refer to the list with =Indirect(B3)... it does not work....

    so I think the code needs modifying... but can't figure it out..

    ...anyone with VBA expertise can help ??
    Attached Files Attached Files

  5. #5
    Forum Guru DonkeyOte's Avatar
    Join Date
    10-22-2008
    Location
    Northumberland, UK
    MS-Off Ver
    O365
    Posts
    21,531

    Re: Another Dependent Data Validation Combobox

    The issue is that your named range for row 2 (unlike the Contextures examples) does not correlate exactly to the value chosen in B, you have accounted for this already in native XL via the Validation List using:

    =INDIRECT("Title"&SUBSTITUTE(B2," ","")

    You must therefore apply the same logic to the VBA... the ComboBox is populated here:

    Please Login or Register  to view this content.
    this then needs to be adapted such that the Named Range string is correct, ie mimic your INDIRECT validation formula such that it becomes:

    Please Login or Register  to view this content.
    Obviously you run into problems if your naming conventions are not consistent...

  6. #6
    Registered User
    Join Date
    04-06-2009
    Location
    Bandung
    MS-Off Ver
    Excel 2003 & 2007
    Posts
    16

    [SOLVED] Re: Another Dependent Data Validation Combobox

    Hey, it worked! now I understand a little bit about the script hehe

    You only need to change which column, str value, and offset value..

    Thanks DonkeyOte and NBVC
    Last edited by blacque; 05-07-2009 at 02:18 AM.

  7. #7
    Registered User
    Join Date
    04-06-2009
    Location
    Bandung
    MS-Off Ver
    Excel 2003 & 2007
    Posts
    16

    Exclamation [HELP AGAIN]Re: Another Dependent Data Validation Combobox

    Umm.. by the way, my friend tried this method in Excel 2007, but it won't work..
    Is there any possible that the script doesn't compatible in 2007? How do I change the script?

    thanks..

  8. #8
    Forum Guru DonkeyOte's Avatar
    Join Date
    10-22-2008
    Location
    Northumberland, UK
    MS-Off Ver
    O365
    Posts
    21,531

    Re: Another Dependent Data Validation Combobox

    I tested the sample file(s) in 2007 so I would disagree with your friend I'm afraid...I suspect there are other underlying problems.

  9. #9
    Registered User
    Join Date
    04-06-2009
    Location
    Bandung
    MS-Off Ver
    Excel 2003 & 2007
    Posts
    16

    Re: Another Dependent Data Validation Combobox

    Can you give me the file you have modified? So my friend can also test yours.thanks

  10. #10
    Forum Guru DonkeyOte's Avatar
    Join Date
    10-22-2008
    Location
    Northumberland, UK
    MS-Off Ver
    O365
    Posts
    21,531

    Re: Another Dependent Data Validation Combobox

    I'm afraid I don't store the files unless I upload here ... the code you had with the advised revision should work without incident on XL2007.

  11. #11
    Registered User
    Join Date
    04-06-2009
    Location
    Bandung
    MS-Off Ver
    Excel 2003 & 2007
    Posts
    16

    Re: Another Dependent Data Validation Combobox

    Okay, thank you very much DonkeyOte. I'll try to check the software first

+ 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