Enter the following formula in cell B2, and then fill the formula down.
=IF(ISNUMBER(FIND ("ball ",A2))," ball "," other ")
The formula shows that if the word "ball" is found in cell A2, "ball game" is returned; If it is not found, return to "Other Classes".
Method 2:
Enter the following formula and fill it down.
=IF (or (A2={ "Football", "Badminton", "Shot Put"}), "Ball", "Other")
Method 3:
Enter the following formula and fill it down.
=IF(COUNTIF(A2, "* ball ") > 0," ball ","other ")