I'd like to be able to search a column (say A) cell-by-cell and, if the cell contains certain strings (say "apple" or "pear"), print a certain value (say "A" or "P") in the corresponding cell of another column (say B).
So, if A1 has "pear", then B1 will say "P". If A1 has "apple", B1 will say "A".
What formula can I use to accomplish this?