I work with G sheets in various contexts and this is a pretty frequent use case. In this case, let's say the spreadsheet looks like this: https://docs.google.com/spreadsheets/d/1PAg2Gr2T1gUmqlbAJaJjMQ37yO_YI5sYz9WMY3Q1lEg/edit?usp=sharing
Continents in Column B, Countries in Column C. And then, on another sheet, a list of values that correspond with a given country. So what I want is in Column C to select from the list of continents, but in column D, select from the list of countries within that continent.
Col. B | Col. C | Col. D |
Paris | Europe | France|
I've reviewed questions going over how to do this with scripts, but can't seem to replicate it. I'm also wondering if there's a quick-and-dirty way to do this with formulas or by adding additional filtered tables.
You can use a script or a formula to accomplish a dependent drop-down list.
Google Apps Script
Single dropdown menu:
Create a dropdown list in cell
C6
of theData
sheet that takes values from the rangeB3:B
in theValues
sheet (column Region). Then copy the code below to the script editor and click on save. Every time you select a new item in the dropdown list in cellC6
, a dependent dropdown list will appear/updated with a list of the corresponding countries in cellD6
. See Instructions on how to setup and use this solution.Instructions:
Multiple dropdown menus:
The logic is exactly the same as before. The only modifications you have to do is to drag up/down the dropdown list in column
C
to the cells that you want to have a dropdown list and use this script instead:Google Sheets Formula
Instead of providing an explanation here which will make this post even longer than already is, I prefer to redirect you to a YouTube video that will help you figure out how to set up a dependent dropdown list using google sheet formulas:
Google Sheets - Drop Down List, 2 Dependent Dropdown Lists