If you have a column with course names, then the next column could use a VLOOKUP() to lookup the course name in a table consisting of course names and course type
2 Math Annual
3 Advanced Math Bi-annual
4 Statistics Tri-annual
5 Banking meltdown One-off
If cell D2 contains a course name put this in E2
Note the $ signs for the lookup table address
The formula will return the course type
2, in the formula means that the value is returned from the second column in the table. False ensures an exact match.
If a course name is not present you will get the #NA error.
This formula can be copied to all rows in that column to return the course type.
The column can be used as the index column for a Sort