FORMULA NEEDED

  • Thread starter Thread starter Angie
  • Start date Start date
A

Angie

IF Q1 CONTAINS THE WORD "OK", I NEED THE CELL TO READ "YES"

iS THERE ANYWHERE I CAN GO TO GET A BASIC HOW TO FOR CONSTRUCTING FORMULAS?
iF i JUST HAD A LIST OF WHAT SITUATIONS CALL FOR WHAT FORMATTING, I WOULD BE
FINE.
 
Try this:

=IF(Q1="ok","YES","something else")
or...maybe...
=IF(Q1="ok","YES","")

Is that something you can work with?

Whenever you have issues constructing a formula you'll probably get an
answer from this forum faster than you can find the answer in Excel Help.

(Also...messages in all capital letters indicate that you're shouting.)
--------------------------

Regards,

Ron
Microsoft MVP (Excel)
(XL2003, Win XP)
 
You can purchase a book on Excel such as John Walkenbach's Excel 2003 Bible
or Excel 2007 Bible. And stop yelling. (That means using capitals).

Tyro
 
Sorry, I forget that Caps Lock is on.

No this isn't working. The cell contains the work "OK" along with other
phrases. THe cell value will not be "OK" This is where I meet my wall. I have
tried formulas with
=IF(Q1 but I cannot use =IF(Q1=
 
Then.....

Try this:
=IF(COUNTIF(Q1,"*ok*"),"YES","something else")

or..
=IF(COUNTIF(Q1,"*ok*"),"YES","")

Does that help?
--------------------------

Regards,

Ron
Microsoft MVP (Excel)
(XL2003, Win XP)
 
Try it this way:

=IF(ISNUMBER(SEARCH("ok",Q1)),"YES","something else")

Allows you to look for the letters "OK" (case insensitive) within the
text in Q1.

Hope this helps.

Pete
 
You're welcome, Ken - thanks for feeding back.

If you want it to be case sensitive you can use the FIND function. The
problem with the above is that it would count a word like "book" if
that was in the string, but using something like "*ok*" couldn't
guarantee to find all OK's if the text began with OK.

Pete
 
This work nicely, as well. Thank you!

Pete_UK said:
Try it this way:

=IF(ISNUMBER(SEARCH("ok",Q1)),"YES","something else")

Allows you to look for the letters "OK" (case insensitive) within the
text in Q1.

Hope this helps.

Pete
 
Thank you, This worked well.

Ron Coderre said:
Then.....

Try this:
=IF(COUNTIF(Q1,"*ok*"),"YES","something else")

or..
=IF(COUNTIF(Q1,"*ok*"),"YES","")

Does that help?
--------------------------

Regards,

Ron
Microsoft MVP (Excel)
(XL2003, Win XP)
 
Is it possible to do this -

Search for the word 'ok' or 'allright' in a character string. For instance,
a sentence in cell A1, "I believe it would be ok" and a sentence "I think it
would be allright", should bring up the output 'Yes' in cell B1. If a string
doesnt have a set of certain words (in this case, 'ok' and 'allright'), then
bring up the output 'No'
 
Just to note - FIND is case-sensitive, whereas SEARCH is not. Also,
you don't really need to specify 1 as the third parameter.

Hope this helps.

Pete
 
Back
Top