1

Is there an Excel formula that can detect whether two cells in the same column contain similar or partially matching text?

For example:

  • F3 contains: "regulation BI, how to stop exploitation";

  • F15 contains: "apples cause natural disasters, regulation BI".

I want a formula that returns TRUE/FALSE when there is a partial match - in this case, both cells contain "regulation BI" - and ideally can also list which cells match.

I have tried formulas like:

=IF(ISNUMBER(SEARCH(F3,F15)),"Yes","No")

But this did not return a partial match.

Any help would be appreciated. Thanks!

3

2 Answers 2

1

For only match, can be used-

=OR(ISNUMBER(SEARCH(TEXTSPLIT(F3,,{" ",","}),F15)))

For listing matching words, can try-

=LET(x,TEXTSPLIT(F3,,{" ",","}),TEXTJOIN(", ",1,FILTER(x,ISNUMBER(SEARCH(x,F15)))))

enter image description here

Sign up to request clarification or add additional context in comments.

Comments

0

To return the matching values in F3 and F15, split the words into an array and then match word by word:

=LET(
    a, REGEXEXTRACT(F3, "\w+", 1, 1),
    b, REGEXEXTRACT(F15, "\w+", 1, 1),
    c, XLOOKUP(a, b, b, ""),
    TEXTJOIN(", ", TRUE, c)
)

enter image description here

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.