简体   繁体   中英

INDEX MATCH with 2 criteria, match with partial text

My data looks like this:

C.............F.............. H

Jane......Blue..........NON

Bob........Blue..........OUI

Jack.......Red..........OUI

Sarah.....Blue..........OUI

John ......Blue.........NON

Claude......Blue.........(empty)

This formula is gonna look in column C if the person has BLUE and OUI.

=IFERROR(INDEX($C$9:$C$514;MATCH(1;("BLUE"=$F$9:$F$514)*("OUI"=$H$9:$H$514);0));"AUCUN")

Output Bob

Then, I have this for the second match =IFERROR(INDEX($C$9:$C$514;SMALL(IF($H$9:$H$514="OUI";IF($F$9:$F$514="BLUE";ROW($F$9:$F$514)-ROW(INDEX($F$9:$F$514;1;1))+1));2));"AUCUN")

Output Sarah

However, I would want the field "OUI" to be a partial text match. So whenever it finds the letter "O", it would return a match.

So the first match would be Jane , the second match would be Bob . I tried replacing "OUI" by "*O*" but it tells me that nothing was found.

If one has the Dynamic Array formula FILTER:

=FILTER(C2:C6,(F2:F6="BLUE")*(ISNUMBER(SEARCH("O",H2:H6))))

在此处输入图片说明


If not then use INDEX(AGGREGATE())

=IFERROR(INDEX(C:C,AGGREGATE(15,7,ROW($F$2:$F$6)/(($F$2:$F$6="BLUE")*(ISNUMBER(SEARCH("O",$H$2:$H$6)))),ROW($ZZ1))),"AUCUN")

在此处输入图片说明

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