[英]How do I automatically update cells to match values from another sheet when one cell is changed using data validation?
I have a list of items on Sheet 1 with the names of each item in column A and then further information in the subsequent 5 columns. 我在工作表1上有一个项目列表,在A列中有每个项目的名称,然后在后面的5列中有更多信息。
On Sheet 2, in each of the cells of column A, I have set it so that I can pick any item from a dropdown list using data validation. 在工作表2上,在A列的每个单元格中都进行了设置,以便可以使用数据验证从下拉列表中选择任何项目。 I want the subsequent cells in the row to automatically assume the value of the respective cells in Sheet 1.
我希望该行中的后续单元格自动采用工作表1中各个单元格的值。
So if in Sheet 2, Cell A1 I select Item 3 (which is in Cell A3 on Sheet one), I want Cell B1 on Sheet 2 to have the same value as Cell B3 on Sheet 1. 因此,如果在工作表2中,单元格A1我选择了第3项(在工作表1中的单元格A3中),我希望工作表2中的单元格B1与工作表1中的单元格B3具有相同的值。
I could get the result I wanted by using =IF($A3='Sheet1'!A3,'Sheet1'!B3,) and then adding each possible item but that seems really long winded and would require adding to the formula every time I added an item. 我可以通过使用= IF($ A3 ='Sheet1'!A3,'Sheet1'!B3,)来获得想要的结果,然后添加每个可能的项目,但这似乎很麻烦,并且每次我都需要添加到公式中添加了一个项目。
Any idea if there is a way of doing this? 知道有没有办法做到这一点? Sorry if my explanation is a bit confusing.
对不起,如果我的解释有点混乱。 My excel knowledge is not great!!
我的专业知识不是很好!
Thanks in advance 提前致谢
Use the Vlookup function Next to your data validation cell, enter (assuming the first sheet called Sheet1): 使用Vlookup函数在数据验证单元格旁边,输入(假设第一张表名为Sheet1):
=Vlookup(a1,Sheet1!a:f,2,0)
This will return the data that match for the 2nd column. 这将返回与第二列匹配的数据。 For the 3rd use:
对于第三种用途:
=Vlookup(a1,Sheet1!a:f,3,0)
And so on.. 等等..
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.