10 pts.
 Find and replace formula in Excel
Hi everybody. I am forex and options trader. Options contracts look like this: 'GOOG 121005C770" or "GOOG 121005P770". I need to have a formula that can lookup the cell and if contains "*******P***" to replace the whole cell with "Put" and if the cell contains "*******C***" to replace the whole cell with "Call". Now I am using find and replace function which is fine. I am using wildcard to find: ******P*** and replace it with Put and then run find and replace again to find: *******C*** and replace it with Call. Is there a way to have a simple formula which can do both searches and replacements. Thanks in advance. E. M.

Software/Hardware used:
Excel 2010
ASKED: October 8, 2012  11:48 AM

Answer Wiki:
=IF(ISERR(FIND("P",<cell>)),IF(ISERR(FIND("C",<cell>)),"Neither", "Call"),"Put") You can create an additional column with just Put and Call, then delete the original.  Wrap with a macro to make automatic.
Last Wiki Answer Submitted:  October 8, 2012  2:58 pm  by  mpez0   630 pts.
All Answer Wiki Contributors:  mpez0   630 pts. , Michael Tidmarsh   11,410 pts.
To see all answers submitted to the Answer Wiki: View Answer History.


Discuss This Question:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _