Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
114 views
in Technique[技术] by (71.8m points)

excel - Find if any of a list of substrings is present in a string

My problem is that I have a long list of titles that need to be categorised based on keywords. There are 10 categories, that each have between 2 and 16 keywords.

I created a table to do the analysis in like so:

Title cat 1 cat 2 etc.
How to foo the bar
Wax on, wax off

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Answer

0 votes
by (71.8m points)

You may try:

enter image description here

Formula in B2:

=--(SUMPRODUCT(--ISNUMBER(SEARCH(F$2:INDEX(F:F,COUNTA(F:F)),$A2)))>0)

This does not account for possible false positive when a substring is found in a larger substring.


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...