简体   繁体   中英

Generate Multiple Matches of partial match

I created an array function, and my aim is to look through the elements of column H and compare them with elements of column D. If H partially matches D (ie H&"*" to D), i want the elements in column E reported for all partial matches. I use the below code, and it works fine, except i cant wrap my head around how to make H match elements of D even if H is only a partial match (with D having more characters to its right).

Thank you all for the anticipated assistance.

{=IFERROR(INDEX($E$2:$E$1526, SMALL(IF($H2=$D$2:$D$1526, ROW($E$2:$E$1526)-1,""),COLUMN()-9)),"")}

Try using helper cells for this

This goes into your first column of helper cells. It will provide a 1 or a 0 for each entry you have. G1 is the look up value and A2:A108 is the table/list to search against
=--ISNUMBER(IFEEROR(SEARCH($G$1,$A$2:$A$108,1),""))

In the next column put this formula =If(D2=1,COUNTIF($D$2:D2,1),"") Column D2 is the results of the first equation.

Lastly in another column put this =IFERROR(INDEX($A$2:$A$108,MATCH(ROWS($E$2:E2),$E$2:$E$108,0)),"") Where E2 to E108 is the result of the countif formula.

Here is an example of the above formulas in action.

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