I am working with excel and trying to find if a portion of one cell matches anything from a list. I am attempting to extract that part of the cell as my result.
The formula I am working with is:
{=INDEX($A$1:$A$10,MATCH(1,COUNTIF(B1,"* "&$A$1:$A$10&"*"),0))}
note: had to space out the asterisk to avoid italics
A1 to A10 is the list i am referencing and anything in column B is what I am searching partail parts for in the list
The problem is the formula return the most common value found in the list instead of the most specific part of the list.
Example:
A(list) B (formula result) (desired Result)
1 ABC sdfjABCsdhfs ABC ABC
2 ABC123 asdfasdfa #N/A #N/A
3 RBZ456 agfhABC1234shj ABC ABC1234
4 ABC1234 wuefhiuvbsiue #N/A #N/A
5 DEF123 dfsghABC123sdf ABC ABC123
The maximum result found in column B is what I am looking to find as my result. Not the lowest common denominator.
Any advice would be great!
Thanks in advance.
edit: added brackets, it is an array formula