Hello, I have a single variable composed of thousands of course names and I need to transform it into a single 5-level variable in excel (math, reading, science, social studies, other).
In variable 1, each course type is represented by potentially hundreds of variations (e.g. Math 1, Math 2, Advanced Math, Mathematics) - too many to enter into an conditional IF/THEN function by hand. The "other" category is for subjects like art, typing, marketing, etc. that are not one of the 4 core subjects listed above.
I would like to know if there is a formula that will give me something like the following: IF column A contains the substring "math" return "math", OR IF column A contains the substring "reading" return "reading, OR IF column A contains the substring "science" return science, OR IF the column A contains the substring "social studies" return "social studies" IF column A does not contain any of these substrings then return "other".
The substrings may be at the beginning, end, or middle of a given string. I have found different functions that I think could be combined to make this work but am not sure how... Thank you!
Bookmarks