I would like to return a value if criteria is met.

If A2 contains the word "apples", then in cell B2, write "apples".
If A2 contains the word "oranges, then in cell B2, write "oranges".
If A2 does not contain the words "apples" or "oranges", leave the cell blank.

Can you help me with a formula for this?

Thanks in advance.