MATCH is a word that can be used in a variety of ways.
=MATCH(A1, "word1,"word2,"word3,"word4","word5", 0) returns the index of the corresponding item in the array list. The trailing 0 indicates that the match should be exact. If it isn't present, it will return #N/A, so you can add an IF(ISNA(to the front to make it behave like your "IN":
=IF(MATCH(A1, "word1,"word2,"word3,"word4","word5", 0),"NO","YES"), "NO","YES")
The order of the "YES" and "NO" has changed.