Excel列匹配,然后select列的ID
我有问题,我无法解决。 我需要通过匹配与其他像这样的一列中select前一个ID
id gname id2 gname2 1 Cefaclor Cefaclor 2 Amlodipine Cefaclor 3 Olmesartan Cefaclor 4 Memantine Amlodipine Olmesartan Olmesartan Memantine
并输出像这样
id gname id2 gname2 1 Cefaclor 1 Cefaclor 2 Amlodipine 1 Cefaclor 3 Olmesartan 1 Cefaclor 4 Memantine 2 Amlodipine 3 Olmesartan 3 Olmesartan 4 Memantine
以下是包含图片中显示的布局示例公式。 您可以在C2中input公式,并填入C8。
您将需要根据您的实际布局调整引用:
C2: =INDEX($A$2:$A$5,MATCH(D2,$B$2:$B$5,0))