find text in a string formula

G

Guest

Here is the formula I am using. The numeric if's work but the text one does
not. Cell AA7 contains a text statement and in that statement the term secure
or security might appear. If if does I want to return an "X". If it does
not I want to continue to evaluate the other cells.

IF(AA7<>"secur",IF(AND(E7<>"",F7<>"",G7<>"",I7<>"",P7<>""),IF(AND(Q7<>"",S7<>"",V7<>"",Q7<>"",AB7<>""),"P","X"),"X"),"P")

Thanks

Todd
 
G

Guest

Thanks Don, that works. Sometimes the word is not first though, it might be
anywhere. Thats what has me stumped

Todd
 
G

Guest

Todd said:
.. Sometimes the word is not first though, it might be anywhere.

Try this as a replacement for the front IF part above:
=IF(SUMPRODUCT(--ISNUMBER(SEARCH({"secure";"security"},AA7)))=0, ..

Replace SEARCH with FIND if you need it to be case sensitive
(SEARCH is not case sensitive)

---
 
G

Guest

Just a clarification that the suggested formula was based on your OP lines:
.. Cell AA7 contains a text statement
and in that statement the term secure or security might appear.


---
 
H

Harlan Grove

Todd wrote...
Here is the formula I am using. The numeric if's work but the text one does
not. Cell AA7 contains a text statement and in that statement the term secure
or security might appear. If if does I want to return an "X". If it does
not I want to continue to evaluate the other cells.

IF(AA7<>"secur",IF(AND(E7<>"",F7<>"",G7<>"",I7<>"",P7<>""),
IF(AND(Q7<>"",S7<>"",V7<>"",Q7<>"",AB7<>""),"P","X"),"X"),"P")

It looks like you have a typo in this formula - there's no need for
Q7<>"" to appear twice.

Could AA7 contain words like 'unsecured' or 'insecurity'? If so, should
these be treated the same as finding 'secure' or 'security'? If so, use
Max's formula. If not, would these words appear delimited by spaces?
 

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