If function

R

Raja

I want use the IF function to display "Contains RR" in a cell if the other
cells which has text that contains RR and "No RR" if the word doesn't contain
RR.

e.g.
A B
1 Carry =IF(A1=*RR*,"Contains RR","No RR")
2 Marry
3 Sweet
4 Harry
5 Sherry
6 Cry

This doesn't seem to work. Ids there any text function that I need to
combine with IF to get the result?

I don't want to use VBA because I don't know anything about it!!
 
M

Mike H

I should have added that if you want it to be case sensitive change SEARCH to
FIND

Mike
 
B

Bob Phillips

=IF(ISNUMBER(SEARCH("RR",A1)),"Contains RR","No RR")


--
---
HTH

Bob


(there's no email, no snail mail, but somewhere should be gmail in my addy)
 
R

Raja

Perfect

Thank you to all of you who contributed to answering this!!

=IF(COUNTIF(A1,"*RR*"),"Contains RR","No RR")
and =IF(ISNUMBER(SEARCH("RR",B3)),"Contains RR","No RR") get me the result
that I am looking for.

Can somebody please explain the various arguments we are using!!
Also if it not much of a problem, can you please resolve this for me?:
When I copy and paste the above mentioned functions to the blank cells below
then if there is any entry on the left hand cell then I am getting the
relevant result but if the cells are blank then I am getting No RR. I need
the result to be Blank until I enter a value in the left hand cell.

Many thanks!!

Raja
 
B

Bob Phillips

=IF(B3="","",IF(ISNUMBER(SEARCH("RR",B3)),"Contains RR","No RR") )

--
---
HTH

Bob


(there's no email, no snail mail, but somewhere should be gmail in my addy)
 

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

Top