简体   繁体   English

索引匹配查询

[英]Index Match Lookup

I have two excel spreadsheets; 我有两个Excel电子表格; one containing field with a social security number, name, date of birth, etc and the other containing the same info but the date of birth is left blank. 一个包含具有社会安全号码,姓名,出生日期等的字段,另一个包含相同的信息,但出生日期留为空白。 What formula would I use to match the social on workbook one to a social on workbook two and return the date of birth for that record from workbook one to workbook two? 我将使用什么公式将第一工作簿上的社交活动与第二工作簿上的社交活动相匹配,并将该记录的出生日期从第一工作簿返回到第二工作簿?

练习册一

工作簿二

I don't have the exact context right, but here's how you can use an Index/Match formula to get this. 我没有确切的上下文权限,但是这是您可以使用索引/匹配公式来实现此目的的方法。

In your DOL Life Census worksheet cell J189, put this formula: 在DOL Life Census工作表单元格J189中,输入以下公式:

=Index('BAS Census'!H:H,match(A189&B189,'BAS Census'!A:A&'BAS Census'!B:B,0))

and enter with CTRL+SHIFT+DELETE . 然后输入CTRL + SHIFT + DELETE

(I recommend having both sheets open, and just entering manually, selecting those ranges with your mouse.) What this does is return a value from an Index (column), based a which row. (我建议打开两个工作表,然后手动输入,用鼠标选择这些范围。)这是根据哪一行从索引(列)中返回一个值。 So, it's going to return some value from "BAS Census column H", based on what row A189 ("Broussard") and B189 ("James") are in BAS Census Columns A and B, respectively. 因此,它将根据BAS人口普查列A和B中的A189行(“ Broussard”)和B189行(“ James”)分别从“ BAS Census列H”返回一些值。

I used First and Last names to get a match, as I assume there may be two people with the same first or last name. 我使用名字和姓氏进行匹配,因为我假设可能有两个人的名字或姓氏相同。 We could be even more specific by checking for First, Last, and SS#. 通过检查First,Last和SS#,我们甚至可以更加具体。 You'd just add &C189 to the first part of the Match() formula, and add the range you expect the socials to be in ( &'BAS Census'!C:C ) to the end of the second part. 您只需将&C189添加到Match()公式的第一部分,然后将期望的社交范围( &'BAS Census'!C:C )添加到第二部分的末尾。

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

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