我有三列:A、B 和 C。一个有name
,第二个有father name
,第三个有ID
数字。我想使用name
and查找 ID 号,father name
因为name
列具有相同的名称条目。
3 回答
I suggest filtering. With labels in Row1 and in say D1:
=IF(SUBTOTAL(2,C:C)>1,"Duplicates!",SUBTOTAL(9,C:C))
you should have no need for further keying (just click on your selections) but (a) still have access to the result in a fixed location (ie D1) while also (b) getting a warning should say two people have the same Name and Father name or the one person have more than a single ID.
For future use it may be worth you creating an extra column with Name and Father name concatenated, as suggested by @John, and perhaps also copying your ID column into a new column on the left, to make VLOOKUP based on ID easier.
您可以使用索引和匹配公式的组合。
公式==INDEX($C$1:$C$5,MATCH(1,($A$1:$A$5=F2)*($B$1:$B$5=F3),0))
作为其数组公式输入公式后按ctrl+ shift+ enter。
您可以连接 A 列和 B 列,然后VLOOKUP
在组合键上使用(这更有可能是唯一的并且是您想要的)。
如果您有 MS Access(因为您已经购买了 MS Office),我建议您在 Access 中执行此类操作。它更适合您想做的事情(以及其他类似的任务):
Select id_number from your_table where name="theName" and fathername="theFatherName"