How do I make an automatic drop down list in Google Sheets?

Type your search query and hit enter:
All Rights ReservedView Non-AMP Version
Type your search query and hit enter:
  • Homepage
  • Google Docs
  • Spreadsheet
Spreadsheet

Multi Row Dynamic Dependent Drop Down List in Google Sheets

We can create a multi-row dynamic dependent drop-down list in Google Sheets that without Scripts. I am just going to use only built-in Google Sheets functions to create a multi-row dynamic dependent drop-down list.

Why Dynamic Dependent Drop Down Lists Are Useful?

I will explain to you, why a dynamic dependent drop-down list in Google Sheets is a must.

Imagine you are running a bookstore. Here you can create a drop-down list that containing all the authors name and their book titles.

When you get a bulk order inquiry, normally from educational institutions, you can send this drop-down list to the customer via email. So that they can easily understand the available book titles with you.

Also with few clicks, they can select the author as well as book titles from the drop-down and send them back to you.

There are plenty of such situations where you can use dynamic dependent drop-down lists.

A] Create A Simple Drop Down List In Google Sheets

Anyone with a limited spreadsheet exposure can easily create a simple drop-down list, not dynamic. How?

I think I should touch this part first before going to our tutorial Dynamic Dependent Drop Down List in Google Sheets. This is the essence of the tutorial.

Your first drop-down menu in Google Sheets is just a click away. To create a simple drop-down list do as follows.

In Cell A2, you can see a drop-down list. This drop-down list allows you to pick any item from the range in C2: C8 from within A2.

Steps:

Here the active Cell is Cell A2 in Sheet2. Go to the menu Data and click Data Validation. Set the rules as below.

Our earlier tutorialRestrict People from Entering Invalid Data on Google Doc Spreadsheetalso shed more light on data validation.

Recommended Reading:The Best Data Validation Examples in Google Sheets.

Now let us move to more complex forms of the drop-down list.

B] How to Create a Dependent Drop Down List In Google Sheets

What is the Term Depended Drop Down List in Google Sheets?

To create a dependent drop down, needless to say, first, there should be a drop-down list. It works like this.

In the above screenshot, you can see a drop-down list in Cell A1 and its dependent in Cell B1. When you select Leo Tolstoy in Cell A1, you can able to select his books in Cell B1.

When you pick another author from the list, the same authors book should be available for selection in Cell B1.

Now let us learn how to create a dependent drop-down list in Google Sheets.

There arethe names of two authors in the range C2: D2. This range we can use to create a drop-down list.

See the list of their books in the range C3: D10 that we can use to create a dependent drop-down list.

We can use the data in Cell C2: D2 for the drop-down as below. This is the same as the simple drop-down list detailed under title A.

Its like this. Make sure that Cell A2 is the active cell. Then go to Data > Data Validation.

The Criteria is List from Range and Criteria Range is C2: D2. Thats all. We have now created a drop-down list in Cell A2 as below that contains two of the authors names.

In Cell B2, we are going to create a dependent drop down. Its sometimes called a Dynamic Dependent Drop Down List in Google Sheets.

Here we are using Google Sheets Named Ranges. What is the purpose of Named Ranges in Google Sheets?

With the Named Ranges feature, we can name a range like C2: C9 as something like sales, total, like any name and use the same in formulas instead of the range.

Similar:A Drop-down Menu in Google Sheets to View Content from Any Sheets in the Current Sheet

Named Range is not a must here. Then why we are using it?

The main reason, we can use Named Ranges in formulas instead of a range. By doing so the formula becomes more readable in the future.

Here we have two authors in the drop-down in cell A2. So we require two named ranges pointing to their book titles.

Create the first named range as below.

Go to the menu Data > Named Ranges and click Add Range. Here Ive given the name Helen_Keller as Named Range name for the range C3: C9. Ive used underscore as Named Ranges wont accept spaces.

Similarly above, add another Name to Range as Leo_Tolstoy for the range D3: D10. So we have two named ranges.

Formula Part in Google Sheets Dynamic Drop Down List

We have already a drop-down list in cell A2. Now we should write a formula connecting the drop-down and the list. In Cell E2 we can write the formula.

Formula:

=if(A2=C2,indirect("Helen_Keller"),Indirect("Leo_Tolstoy"))

I am just doing a logical test with Google Sheets IF logical function here.

The formula compares the value in Cell A2 with C2. If matching, the formula would populate the value from the range C3: C9 (Helen_Keller), otherwise, it would populate the range D3: D10 (Leo_Tolstoy).

We cant independently use Named Range in the logical test. You should use it with Indirect Function as above.

What is the benefit of using the Indirect and named range combo here? Actually, its equal to the below formula.

=ArrayFormula(if(A2=C2,C3:C9,D3:D9))

With Named Range and Indirect combo, we can just avoid the ArrayFormula. Also when the number of lists is large, using an Indirect and Named Range combo can make your formula cleaner.

Now when you select an item from the drop-down in A2, accordingly the values populate in cell E2: E, where we applied the formula. Now we can move to the final step, which is creating the dependent drop-down list.

To do that, go to cell B2, then go to the menu Data > Data Validation.

Set the criteria range E2: E10. Done! Your dynamic drop-down list in Google Sheets is ready.

From this point, we can create a multi-row dynamic dependent drop-down list in Google Sheets.

We just want to modify the formula for this. But again Im repeating the whole process with more authors and books.

C] How to Create a Multi-Row Dynamic Dependent Drop Down List in Google Sheets [Advanced]

Now let us create a multi-row dynamic drop-down list.

As said above, we are following the same steps under title B. But few more additional steps are required, which I will explain as and when required.

In Cell A1, first, we should create a drop-down list with the authors name. In order to do this;

Go to the Menu Data > Validation. Select the criteria range as C1: F1, which is the authors names.

Here we have a list of authors as a drop-down in Cell A1. From this, we can select any of the four authors. Now we need a dependent drop-down list in Cell B1 to select the book related to the author in Cell A1.

Lets do that part.

Named Ranges: See the set of named ranges for this purpose. If you have any doubt about creating Named Ranges, just go back to the steps under Title B.

Now the Formula Part in Multi-Row Dynamic Dependent Drop Down List in Google Sheets

Apply the below formula in Cell G1.

=if(A1=C1,indirect("Agatha_Christie"),if(A1=D1,indirect("Sir_Arthur_Conan_Doyle"),if(A1=E1,indirect("Helen_Keller"),INDIRECT("Leo_Tolstoy"))))

Now in B1, we can create a dynamic dependent drop-down list. Again I am telling you all the steps are already detailed under Title B above.

Go to B1 and then select the Data menu Data Validation. Set the criteria range G1: G15.

Now you can select any author from under the drop-down list in Cell A1. Then you can select the corresponding authors book from Cell B1.

Up to here, the steps are similar to that provided under Title B. Now we want the same list in a multi-row.

I mean we are creating a Multi-Row Dynamic Dependent Drop Down List in Google Sheets.

Here just copying and pasting the drop-down lists in A1 and B1 to adjoining cells below wont work.

We should modify the above formula in Cell G1 as below.

=ArrayFormula(if(len(A1:A),transpose(ArrayFormula(if(transpose(A1:A)=C1,indirect("Agatha_Christie"),if(transpose(A1:A)=D1,indirect("Sir_Arthur_Conan_Doyle"),if(transpose(A1:A)=E1,indirect("Helen_Keller"),INDIRECT("Leo_Tolstoy")))))),""))

Now go to cell B1 and modify the data validation range from G1: G15 to G1: T1.


A Very Important Update on 02-Feb-2021:

Make sure that, in the data validation, you use absolute reference in A1 and relative reference in B1. To do that;

Click cell A1, go to Data > Data validation, and make sure that the range is =$C$1:$F$1 not =C1:F1.

Then click cell B1 and go to Data > Data validation and make sure that the range is =G1:T1 not =$G$1:$T$1


Now copy and paste the lists in Cell A1 as well as Cell B1 downwards as per your requirement.

Update on 02-02-2021:The below step is not required.

After that, in cell B2, B3, B4, etc. change the data validation range as G2: T2, G3: T3, G4: T4 respectively. Thiss because while copy and pastes a data validation list, there is no option in Google Sheets to change the range automatically.

Thats all.

Conclusion

We have successfully created our first-ever Multi-Row Dynamic Dependent Drop Down List in Google Sheets. Hope you enjoy it!

https://docs.google.com/spreadsheets/d/1xe15-OBAe183XlJTh_mPwo67CEeQXaCcKY3UloXA2oo/edit?usp=sharing

Feel free to make a copy of this sheet, where Ive made my above experiments.

Prashanth

A Spreadsheet lover and a Product Expert in Google Sheets, Prashanth was once a power user of dBASE.

Next How to Use IMPORTHTML Function in Google Sheets [Advanced Use] »
Previous « How to Use UNIQUE and SUM Together in Google Sheets

View Comments

  • Alex says:
    January 30, 2018 at 4:12 pm

    brilliant
    too bad there is no option in Google Sheets to change the range automatically.

    • Prashanth says:
      February 2, 2021 at 11:45 am

      Hi, Alex,

      It's now supported! I've updated the post.

      • Bhavesh Gwalani says:
        February 8, 2021 at 2:13 pm

        I'm not able to get this new option, do you know how do I get that option?

        • Prashanth says:
          February 8, 2021 at 2:38 pm

          Hi, Bhavesh Gwalani,

          In your Sheet, in any blank cell do as follows.

          Go to the menu Data and click "Data validation". Select the "Criteria: List from a range".

          You can see the below note just above "Show drop-down list in a cell".

          "Tip: Use absolute references (e.g. =$A$1:$B$1) to lock rows & columns."

          If it's not showing, the update is not yet fully rolled out by Google. Please wait for a few more days.

          • Josh says:
            February 9, 2021 at 11:10 am

            Hi Prashanth,

            I see the text you reference but am having the same issue. Ranges aren't updating automatically. Every time I click back into data validation the relative reference I last saved has been locked as an absolute reference. Any ideas?

          • Prashanth says:
            February 9, 2021 at 12:14 pm

            Hi, Josh,

            Include = sign. For example, you should write the reference as =Sheet1!G1:T1 not Sheet1!G1:T1.

  • Luca says:
    March 1, 2018 at 6:31 pm

    Hi!
    I'm currently trying to make an order form for textiles and want to use your method to have dependent drop down menus f.e. product > color > motive, etc. but i can't seem to get it to work, I always get a parsing error. I made all the steps exactly as shown and just altered the inputs and named ranges etc. to make them fit my topic. Can you help me in any way?

    • Prashanth says:
      March 1, 2018 at 10:26 pm

      Hi,
      I've shared the file. You can check your mail.
      Thanks!

      • Denise says:
        January 10, 2021 at 9:40 pm

        Hi! I know this is a few years late but I'm also getting a "formula parse error" can you help me too.

  • Jeff says:
    March 17, 2018 at 8:54 pm

    Nice Idea ... but I just built up the system and discovered it's fatal flaw ...

    "Then, in cell B2, B3, B4 etc. change the data validation range as G2:T2, G3:T3, G4:T4..."

    The updating of the data validation definition .... for every row! ... makes this a very clumsy operation and something my users (nor I) really want to do. And sort of defeats the purpose. We have hundreds and hundred or rows of data subject to validation, its just not practical.

    I applaud the effort, but its still doesn't solve the problem.

    Google just needs to allow =indirect() in the data validation (like excel does).

    • Prashanth says:
      March 17, 2018 at 10:23 pm

      You're absolutely right. It's useful if the number of rows are limited. My intention was to make it public that it's possible in Google Sheets using formulas. In Google Sheets, you can use scripts for dynamic depended drop down list. Many users use it. Just Google it to find.
      Thanks for the drop by :)

      • Leonardo says:
        May 21, 2018 at 10:52 am

        I've searched too much for days, months and it's not possible yet. I think I will go back to excel.

        • Prashanth says:
          May 21, 2018 at 11:24 am

          Hi Leonardo,

          Google Sheets has that limitation. With my tutorial above you can overcome it to some extent (in a small dataset)

          All I can do is to give you my sample sheet with full access. Here it's (other readers can also follow this link)

          https://docs.google.com/spreadsheets/d/1xe15-OBAe183XlJTh_mPwo67CEeQXaCcKY3UloXA2oo/copy

          But if you are looking to use the dynamic drop-down in a large set of data, you may want to try Script.

          I am not familiar with using Google Scripts. I recommend you to post your query on Google Apps Script G+ community.

          https://plus.google.com/communities/102471985047225101769

          Thanks.

        • Skorch says:
          January 11, 2019 at 3:29 pm

          Isn't it possible to do that with the ROW formula?

      • Jottardsen says:
        October 15, 2019 at 2:15 am

        There's a solution for multiple rows with google script here:

        https://stackoverflow.com/questions/47619562/how-to-copy-data-validation-in-a-relative-way-specifically-list-from-range-wit

        • Prashanth says:
          October 15, 2019 at 8:32 am

          Thanks for sharing :)

    • Prashanth says:
      February 2, 2021 at 11:48 am

      Hi, Jeff,

      Now no need to change the reference in the data validation one by one. Updated the tutorial.
      Thanks, Google for the new update.

  • Sigri44 says:
    April 4, 2018 at 7:02 pm

    Hi guys, thanks for this topic !

    I have a problem, i want to make a multiple dropdown list but it's don't work.

    Can you help me ?

    • Prashanth says:
      April 4, 2018 at 9:52 pm

      I've shared my sheet with you! You can make use of that. If you want to make it on a large number of rows, it's not suggestible as it can slow down your sheet.

  • 12345 says:
    April 5, 2018 at 4:54 am

    Hello,

    I have copied out your whole example and have used the same names and cell numbers. However, I can't get the last formula to work it comes up with #ERROR (formula phrase error). Can you please assist.
    Thank you

    • Prashanth says:
      April 5, 2018 at 5:43 am

      Hi,
      Let me send you an editable copy of this dynamic depended dropdown list today! Hopefully you can check the formulas.
      Thanks.

  • Debbie Golightly says:
    April 10, 2018 at 10:24 pm

    Can I get a copy of the dynamic dependent dropdown sheet? Please, it will make a project I am working on much easier. Thank you :)

  • Wayne Schomaker says:
    April 20, 2018 at 2:04 am

    Hi,

    I am having the same problem as Luca and 12345 above. I get the same ERROR message, I copy the formulas and use your same cell locations. If there is any resolution to this issue. Thanks!

    • Prashanth says:
      April 20, 2018 at 9:08 am

      Hi,
      Please see the link shared at the end of the post under "Conclusion". Open the file. For full access feel free to make a copy from the FILE menu in Google Sheets. Copy the formulas.

  • froilan esteves says:
    May 7, 2018 at 6:24 am

    hi,
    can i request for the editable sheet so i can use it in my office inventory.thanks.

  • Michele Santoro says:
    May 30, 2018 at 3:40 pm

    Thank you very much for this Prashanth, it's working perfectly for my needs. I used normal ranges instead of named ranges, created a source categories \ sub-categories sheet which is linked to a "master" data entry sheet, which has to be configured row by row only once, being possible to duplicate it as many times as I need and at the same time being possible to update the categories \ sub-categories values.
    Thanks again, I looked for such kind of solution for long and now I can develop my organization's project management tool as I wanted.

    • Prashanth says:
      May 30, 2018 at 5:13 pm

      Hi, Michele,

      I am glad that it worked for you!

      I was actually expecting negative reviews as this tutorial is little tough to follow and the formula is not flexible enough. But it's a unique attempt.

      I am a non-native English speaker that sometimes affect my tutorials negatively.

      Cheers!
      Prashanth KV

      • Michele Santoro says:
        May 31, 2018 at 3:28 pm

        Hi Prashanth,
        I tried several other methods found on the internet and yours is the only that actually works (for me) without scripts and leaves open more opportunities of improving its use.
        I do agree that it's not flexible enough when you have to create different formats of data sheets, but if you have to replicate the same format on different sheets, it's quite easy and flexible, allowing also updatable categories and subcategories.
        My english is also not native, so my apologies if I'm not making clear enough...
        Keep up with your work and suggestions.

  • John says:
    July 21, 2018 at 5:33 am

    I found this script some time ago to dynamically create dependent dropdown lists based on name ranges.

    function depDrop_(range, sourceRange){
    var rule = SpreadsheetApp.newDataValidation().requireValueInRange(sourceRange, true).build();
    range.setDataValidation(rule);
    }
    function onEdit (){
    var s = SpreadsheetApp.getActiveSheet();
    var aCell = s.getActiveCell();
    var aColumn = aCell.getColumn();
    if (aColumn == 2 && s.getName() == "Sheet1"){
    var range = s.getRange(aCell.getRow(), aColumn + 1);
    var sourceRange = SpreadsheetApp.getActiveSpreadsheet().getRangeByName(aCell.getValue());
    depDrop_(range, sourceRange);
    }
    }

    You need to create a separate sheet with the dropdown lists and create name ranges for each option.

    Col A | Col B | Col C ...
    1 Item1 Item2
    2 Item1 Item1a Item2a
    3 Item2 Item1b Item2b

    Create a Name Range for Col B and Col C, ect.. script work perfect for multiple rows.

    Cheers!

    • Prashanth says:
      July 21, 2018 at 9:53 am

      Hi, John,

      Thanks for sharing the script here and the credit goes to the concerned.

      Being an active Google TC in Sheets, I have also seen this / similar script.

      I am not familiar with scripts and my attempt was to prove that the dynamic drop-down is possible with formulas too but with limitations.

      Many experts think it's not possible even in a limited way!

      So I wrote this post for the educational purpose.

    • Juan C. Miranda says:
      November 14, 2018 at 9:22 pm

      Hi John!

      I'm not familiar with script use. Do you know where I can find how to use and correctly configure this script so I can use it?

      Thank you!

      • Prashanth says:
        November 15, 2018 at 10:26 am

        Hi, Juan,

        I highly recommend you to shoot your questions on the Google Apps Script G+ community.

        Update: Link removed. As far as I know, the 'G+ community" is no more existing or moved.

1 2 3 4 Next »
Leave a Comment
Published by
Prashanth
Tags: Google DocSpreadsheet
4 years ago

    Related Post

  • Two Ways to Specify Blank Cells in Google Sheets Formulas
  • Count Values Between Two Dates in Google Sheets
  • How to Use the VARA Function in Google Sheets

Recent Posts

  • Spreadsheet

Two Ways to Specify Blank Cells in Google Sheets Formulas

You may already know how to specify blank cells in Google Sheets formulas. But still,

5 hours ago
  • Spreadsheet

Count Values Between Two Dates in Google Sheets

Count values between two dates or date range is a broad topic. Depending on our

3 days ago
  • Spreadsheet

How to Use the VARA Function in Google Sheets

The VARA function in Google Sheets is one of the four functions for estimating variance

6 days ago
  • Spreadsheet

Check Row-Wise If Any of the Values Are Present in Columns

In Google Sheets, I want to check row-wise if any of the numeric or text

1 week ago
  • Spreadsheet

How to Find Closest Match in Google Sheets

To find the closest match in an array of numeric values in Google Sheets, we

2 weeks ago
  • Spreadsheet

Create a List from Multiple Column Checked Tick Boxes in Google Sheets

With the help of the FILTER function, we can create a list from a single

2 weeks ago
All Rights ReservedView Non-AMP Version
  • t