Void S
Void S

Reputation: 802

Excel - Formula To Find Match On List of Keywords?

If I have colors going from cells B1-B6 (Red, Orange, Yellow, Green,Blue,Purple)

And then a sentence/string in cell A1 - (There was a orange box).

I want a formula in cell C1 where if there is a match on any of the keywords, that is should spit out the keyword it matched. Attached is a screenshot example.

I would also want this formula in C1 to be able to drag down and have it "auto-fill". So that if I put any sentence in cell A2, it should repeat the formula in C1, but for this new cell of A2 automatically.

ImageExample

Upvotes: 0

Views: 4516

Answers (1)

PRASIDHA
PRASIDHA

Reputation: 69

Use the formula:

=XLOOKUP(1,--ISNUMBER(SEARCH(B1:B6,A1)),B1:B6,"no match",2) in the "C" Column.

it will work!

Solution

Upvotes: 1

Related Questions