简体   繁体   English

Excel,下拉列表更改另一个单元格的内容,而不是公式化

[英]Excel, drop-down list changes contents of another cell, not formulaic

How do I make one cell display a value based on another cell choice that is a drop-down list selection?如何使一个单元格显示基于下拉列表选择的另一个单元格选择的值? I don't know how to do macros, and I have tried researching.我不知道如何做宏,我已经尝试过研究。 I think the question about displaying a custom state based on an sls file is close, but I don't know what and sls file is or how to code.我认为关于基于 sls 文件显示自定义状态的问题很接近,但我不知道 sls 文件是什么或如何编码。 Is there a simple way to tie two cell values together?有没有一种简单的方法可以将两个单元格值联系在一起? eg.例如。 I want to be able to change the dollar value displayed in cell B (which represents a real cost of a subscription) based on what subscription choice I select from a drop-down list in cell A.我希望能够根据我从单元格 A 的下拉列表中选择的订阅选项来更改单元格 B 中显示的美元价值(代表订阅的实际成本)。

Say cell A1 has a Data Validation pull-down allowing you to select one of:假设单元格A1有一个数据验证下拉菜单,允许您选择以下之一:

cat
dog
bird
snake

In another cell enter:在另一个单元格中输入:

=LOOKUP(A1,{"cat","dog","bird","snake"},{10,20,30,40}) =LOOKUP(A1,{"cat","dog","bird","snake"},{10,20,30,40})

=LOOKUP(A1,{"bird","cat","dog","snake"},{10,20,30,40})

The list in the formula must be in alphabetic order.公式中的列表必须按字母顺序排列。

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

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