简体   繁体   English

一个基于Excel中另一个下拉列表的下拉列表值

[英]A drop down list value based on another drop down list in excel

I have two drop down lists in excel with same list of values (basically months of year which is fetched from a database, not relevant to the question here) 我在excel中有两个具有相同值列表的下拉列表(基本上是一年中从数据库中获取的月份,与此处的问题无关)

Now I want one drop down list value to change based on the value of another drop down list. 现在,我希望一个下拉列表的值根据另一个下拉列表的值进行更改。

For example, consider that both lists contain values "Aug-2016" and "Jul-2016". 例如,考虑两个列表都包含值“ 2016年8月”和“ 2016年7月”。 If I select "Aug-2016" in one list the other list value should be "Jul-2016" (As in one drop down list value should be one month less than other drop down list value) 如果我在一个列表中选择“ 2016年8月”,则另一个列表值应为“ 2016年7月”(因为一个下拉列表值应比其他下拉列表值短一个月)

I know that it is possible through macros but any one knows if it is possible through excel formulae. 我知道可以通过宏来实现,但是任何人都知道可以通过excel公式实现。

I found it. 我找到了。 We can just use EOMONTH function in the second drop down list and that works. 我们只需在第二个下拉列表中使用EOMONTH函数即可。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM