Dependent Drop Down List

  • Hi,

    I am a newbie here and barely new with this VBA macro stuff.

    I have here a sample of my file which I am doing on my everyday work. I have searched all resources that I can get from the internet and tried them to this file but all is not working (or I don't know how to fix the error). Can you give me the exact code that I will put on this so I can have a dependent drop down list?

    If you see on the attached file. I need another drop down on the Column B which is the General Issue. What I want is when I select the code "APR" from the status, another drop down will show on Column B that is only applicable for "APR" only. And then for code "BO" and so on.

    I'm really hoping you can help me on this one. Please. Thank you so much in advance. :)


  • Re: Dependent Drop Down List


    Thank you for your response.

    Yes, I have tried this one but whenever I will copy-paste something on it, it will over ride the "data validation" formula. So what will I do is that I will again put data validation and so on.

    This file is just a sample of my workbook but what I am trying to do with this is that this will be my template. So whenever I copy paste the data on this file, I don't want to repeat over the formula that's why I am looking for a vba code that I will just automatically run to this worksheet.

  • Re: Dependent Drop Down List

    You have to create three named ranges based on the categories used in your first drop down (APR, BO and DNL) and use these as the names. Then add data validation in e.g. B2 (or select all the relevant cells) and use the list option and for the source type =INDIRECT(A2). This will populate B2 with the entries in the named range selected in A2. You don't need VBA for this.

  • Re: Dependent Drop Down List

    the data validation will not work in an existing data.. there will be an extracted file wherein there is already a value in General Issue column. If I'm going to use this Indirect formula I will have to manually put the formula everytime I will extract the data. That's why I am needing of a vba code to automate the general issue column.

  • Re: Dependent Drop Down List

    I don't really understand that, but this should add validation to B2:B10

  • Re: Dependent Drop Down List


    Attached is the actual data extracted from my work. As you can see, there is already an existing data on the General Issue column that's why the "indirect" formula via data validation will not work. That formula will only work for blank cells only. But in my case, there is already a value on GenIssue column that's why I am having a hard time looking for the correct syntax code where in my General Issue dropdown depends on what will I put on Status Column.

    Sorry for the confusion. I really hope you could help me on this one. I did tried vlook up function (vba) but still having an error.

Participate now!

Don’t have an account yet? Register yourself now and be a part of our community!