excel下拉列表联动
In Excel, you can use data validation to create drop down lists on a worksheet. Usually, a simple list is all that's needed, to make it easier for people to enter the correct data. This example is a bit more complicated, and has 2 drop down lists, one for country and one for city.
在Excel中,您可以使用数据验证在工作表上创建下拉列表。 通常,只需要一个简单的列表,以使人们更容易输入正确的数据。 这个例子有点复杂,有2个下拉列表,一个用于国家,一个用于城市。
相关下拉列表 (Dependent Drop Downs Lists)
In this example, there are dependent drop down lists:
在此示例中,有相关的下拉列表 :
- Select a country in column A 在A列中选择一个国家
- In column B, the drop down list shows cities from the country selected in that row 在B列中,下拉列表显示该行中所选国家/地区的城市

请参阅如何设置列表 (See How to Set Up the Lists)
In this video, you can see how to set up the lists for the data validation. Then, see how to use the INDIRECT function in the data validation rule, to show the correct city list, depending on the selected country.
在此视频中,您可以看到如何设置数据验证列表。 然后,查看如何在数据验证规则中使用INDIRECT函数 ,以显示正确的城市列表,具体取决于所选的国家/地区。
获取样本文件 (Get a Sample File)
If you prefer written instructions for setting up dependent drop down lists, go to the Dependent Data Validation page on my Contextures website.
如果您希望使用书面说明来设置相关的下拉列表,请转到Contextures网站上的“ 相关数据验证”页面 。
On that page, you'll find another example of this technique, with step by step details, and screen shots to show the steps.
在该页面上,您将找到该技术的另一个示例,其中包含逐步的详细信息,以及显示步骤的屏幕截图。
There is a sample file on that page too, so you can see how the dependent drop down lists work.
该页面上也有一个示例文件,因此您可以查看从属下拉列表的工作方式。
翻译自: https://contexturesblog.com/archives/2011/09/02/excel-drop-down-lists-for-country-and-city/
excel下拉列表联动