Finding Charecters in the cell

lprabhu1107

Board Regular
Joined
Mar 10, 2011
Messages
106
Dear All,

I have following in the cell "OCN3MIN5" in A1 & "ORPXPIN2" in A2 and so on. If "CN" is there in cell A1 i should get yes in cell B1 and if "PIN" is there in Cell B2 i should get yes in cell B2.

can you suggest aIf command to do this

Regards

prabhu
 

Excel Facts

When they said...
When they said you are going to "Excel at life", they meant you "will be doing Excel your whole life".
Hi Prabhu,

welcome to the board

this will check the cells A1 & A2 for CN & PIN
Excel Workbook
AB
1OCN3MIN5Yes
2ORPXPIN2Yes
Sheet1
Excel 2003
Cell Formulas
RangeFormula
B1=IF(ISNUMBER(SEARCH("CN",A1)),"Yes","no")
B2=IF(ISNUMBER(SEARCH("PIN",A2)),"Yes","no")


if the search text is going to vary for each cell, then you need to try a different method
 
Upvote 0
Code:
=IF(IFERROR(FIND("CN", A1);"")="", "no", "yes")
=IF(IFERROR(FIND("PIN", A2);"")="", "no", "yes")
 
Upvote 0

Forum statistics

Threads
1,224,522
Messages
6,179,299
Members
452,904
Latest member
CodeMasterX

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top