简体   繁体   English

Excel-2个工作表中的2个表(如果2个表中的2个单元格匹配,则在表2中查找单元格值)

[英]Excel - 2 tables in 2 worksheets (Find cell value in Table 2 if 2 cells from 2 tables match)

Here's a simple explanation of my current dilemma: 这是我当前困境的简单解释:

Table 1 (worksheet1): Column A contains Call Description (each call description has 3 time rates) Column B contains Time Rate (day, evening and weekend) 表1(工作表1): A列包含呼叫说明 (每个呼叫描述具有3个时间率) B列包含时间率 (白天,晚上和周末)

Table 2 (worksheet2): Similar layout where Column A and B contains Call Description and Time Rate but Column H contains the cost of that specific combination of Call Description and Time Rate . 表2(工作表2):类似的布局,其中A列和B列包含通话说明时间费率,H列包含该通话说明时间费率的特定组合的成本。

So, I want to find out the cost of a specific call combination ( Column H in Table 2) when the Call Description and Time Rate matches in both tables. 因此,当两个表中的“ 呼叫说明”和“ 时间费率”匹配时,我想找出特定呼叫组合的成本(表2中的H列 )。 Thus returning the cost value in a Column T in worksheet 1. 因此,在工作表1的T列中返回成本值。

Essentially I'd want Column T in worksheet 1 to return the cost of the call combination. 本质上,我希望工作表1中的T列返回调用组合的成本。

Thanks 谢谢

Is using Index and Match the right way to go? 使用索引匹配匹配是正确的方法吗?

You can use array formula INDEX(MATCH()) : 您可以使用数组公式INDEX(MATCH())

=INDEX(Sheet2!H:H,MATCH(Sheet1!A1&Sheet1!B1,Sheet2!A:A&Sheet2!B:B,0))

You'll have to apply it with Ctrl + Shift + Enter . 您必须通过Ctrl + Shift + Enter来应用它。

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

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