简体   繁体   English

使用数据验证更改一个单元格后,如何自动更新单元格以匹配另一个工作表中的值?

[英]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.

相关问题 如何在一张纸到另一张纸中的特定单元格的范围内复制单元格数据? - How do you copy cell data in a range from one sheet to specific cells in another sheet? 是否有一种有效的方法可以通过匹配单元格将数据从一张表更新到另一张表 - Is there an efficient way to update data from one sheet to another with a match of a cell 如何使用 Apps 脚本自动将信息的行和单元格从一张纸移动到另一张纸? - How can I automatically move rows and cells of info from one sheet to another using Apps Script? PHP的Excel单元格数据验证,以包括另一个工作表中的单元格 - php excel cell data validation to include cells from another sheet 如何使用XlsxWriter根据另一个工作表中的相应单元格值来格式化一个工作表中的所有单元格? - How to format all cells in one sheet based on corresponding cell values in another sheet using XlsxWriter? 使用MATCH和INDEX将值从一张纸复制到另一张纸 - Copy values from cells from one sheet to another with MATCH and INDEX Macro Excel可根据单元格匹配将范围单元格从一张纸复制到另一张纸,如果不匹配,则跳过单元格 - Macro Excel to copy range cells from one sheet to another based on cell match and skip cell if no match 从一张工作表中创建与另一张工作表上的单元格匹配的所有值的列表 - Create a list of all values from one sheet that match a cell on another 当另一个单元格中的值更改时,如何自动将公式放入单元格? - How do I automatically put a formula into a cell when a value is changed in another cell? 如何考虑根据另一张表中单元格的值将数据放入一张表 - How to consider putting data into one sheet based on values from cells in another sheet
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM