Find and replace formula in Excel

10 pts.
Tags:
Microsoft Excel 2010
Microsoft Excel formulas
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

Answer Wiki

Thanks. We'll let you know when a new response is added.

=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.

Discuss This Question:  

 
There was an error processing your information. Please try again later.
Thanks. We'll let you know when a new response is added.
Send me notifications when members answer or reply to this question.

REGISTER or login:

Forgot Password?
By submitting you agree to receive email from TechTarget and its partners. If you reside outside of the United States, you consent to having your personal data transferred to and processed in the United States. Privacy

Forgot Password

No problem! Submit your e-mail address below. We'll send you an e-mail containing your password.

Your password has been sent to:

To follow this tag...

There was an error processing your information. Please try again later.

REGISTER or login:

Forgot Password?
By submitting you agree to receive email from TechTarget and its partners. If you reside outside of the United States, you consent to having your personal data transferred to and processed in the United States. Privacy

Thanks! We'll email you when relevant content is added and updated.

Following