Using COUNTIF to match a String in a StringArray to a list

Copper Contributor

Right now, I have a list of keywords on one sheet, and on another sheet I have a few columns dedicated to the names of majors. My current conditional formula will fill the majors cells green if: COUNTIF uses the list of keywords and tries to match the current cell to one of the keywords. So if 'Journalism' is the cell, the formula goes into the list on the other sheet, sees that 'Journalism' is an entry, and color codes it accordingly. 

 

My problem is that in more complicated cells like 'Early Childhood Education', the formula sends it as a whole and does not match the 'Education' in the full phrase to the 'Education' in the list of key terms. My question is, is it possible for the formula to pick apart the cell to match it with the list, maybe taking it as an array of words and matching one of them to the list?

mystiqdreamer_3-1633533255933.png

mystiqdreamer_1-1633533170079.png

mystiqdreamer_2-1633533194923.png

 

3 Replies

@mystiqdreamer 

Why don't you adjust your list of desirable majors?

 

@Detlef Lewin That's what I've done in the meantime; I copy/pasted the majors that popped up into my list so the function would detect them. Only thing about that is when I reach new majors that I want as part of the desirable list, they'd have to be manually entered as well, rather than having a portion of it be auto-detected by what I'm looking for. Doing it manually isn't so inconvenient, but it does suck as I have 50+ more colleges to research and some majors are technically the same but called slightly different things.

 

It's definitely an option that solves the problem, but it doesn't satisfy my c#-code-brain thinking :'3 Thanks for the suggestion.

@mystiqdreamer 

It's probably possible to create such a formula but it is also probable that there will be problems ahead: false positives/negatives or different delimiters.

So you might still end up editing your list of desirable majors.