简体   繁体   English

Excel 计数或索引/匹配公式

[英]Excel countif or index/match formula

This involves two files.这涉及两个文件。 If B2 (file2) is somewhere in column A (file1) (and matches exactly), then go to D2 (file2) and check if that is anywhere in corresponding cell in column E (which wouldn't match exactly) and return yes or no.如果 B2 (file2) 位于 A (file1) 列中的某个位置(并且完全匹配),则转到 D2 (file2) 并检查它是否位于 E 列中相应单元格中的任何位置(不完全匹配)并返回 yes 或不。

Let us assume that all data appears in sheet 1 in both File 1 & File 2.You could try the below formula from another sheet.让我们假设所有数据都出现在文件 1 和文件 2 的工作表 1 中。您可以从另一张工作表中尝试以下公式。 Have in mind that the for the not exact match i use i use "*" in the formula which means that will match anything starting with the value of D2.请记住,对于我使用的不完全匹配,我在公式中使用“*”,这意味着它将匹配以 D2 的值开头的任何内容。 in other cases would not match.在其他情况下将不匹配。

File 1文件 1

在此处输入图片说明

File 2档案 2

在此处输入图片说明

Another File另一个文件在此处输入图片说明

=IF(AND(IFERROR(IF(MATCH('[File 2.xlsx]Sheet1'!B2,'[File 1.xlsx]Sheet1'!A:A,0)>0,"Match"),"No match")="Match",IFERROR(IF(MATCH('[File 2.xlsx]Sheet1'!D2&"*",'[File 1.xlsx]Sheet1'!E:E,0)>0,"Match"),"No match")="Match"),"Yes","No")

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

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