Character

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

Hello,

I would like cell B1 to reference cell A1, and if cell A1 contains a "N"
within the cells text (multiple characters) then I would like cell B1 to give
a particular phrase otherwise give other text.

Thanks,
 
Hi tjh

Use the =FIND function nested within an =IF function.

Your check within the IF function should look for an #N/A return from the
FIND function.

Excel's help or textbooks should explain these well.

Regards

Phil
 
=IF(ISNUMBER(SEARCH("N",A1)),"phrase 1","phrase2 ")

--
HTH

Bob

(there's no email, no snail mail, but somewhere should be gmail in my addy)
 
=if(countif(a1,"*N*")>0,"it's there","it's not there")
or
=if(isnumber(search("n",a1)),"it's there","it's not there")
or
=if(isnumber(Find("N",a1)),"it's there","it's not there")

=find() is case sensitive.
=search() is not case sensitive.
The =countif() is not case sensitive, too.
 
Is this what you mean? I get a Value error with this. Not sure what I am
doing wrong.
=IF(ISNA(FIND("N",A1)),"NO N",FIND("N",A1))

Thanks,
 
Apologies I should have suggested checking for #Value! rather than #N/A!

=IF(ISERR(FIND("N",UPPER(A1))),"No N","N")

I've also added UPPER, this will find "n" and "N".

Regards

Phil
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top