Calculated Field IfElse and Contains

Hello,

I am just learning how to use calculated fields and I am looking to create a field for contacts.

I want it to look at the contacts title and if it contains finance I want the field to show a F also if the the title shows operations I want it to show O. If it has neither I want it to be blank.

I have been trying to use the IfElse formula with the contains formula I have got this so far.

ifElse(contains("$title","Fin"),"F","")

This does not return any value and I have not figured out how to add another variable like the operations part.

Any help would be appreciated.

Thanks!