简体   繁体   中英

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.

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. 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. in other cases would not match.

File 1

在此处输入图片说明

File 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")

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

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