I'm trying to extract a substring from a string only if that substring is in a list. See screenshot:
If the string in column A contains any of the strings in the list of column C, I want that substring next to it in column B. "Associate ABC" isn't found in the list, so it doesn't change. The other 2 entries contain something in the list from column C, so they are changed to only their match in column C.
This will iterate the desired substrings and return the first that matches. If no matches are found then it will error. The IFERROR then returns the actual string.