AND OR SEARCH together

  • Thread starter Thread starter jamie.cutting
  • Start date Start date
J

jamie.cutting

Im trying to use the below but not getting much joy.

=IF(AND(CW11=1,OR(SEARCH({"PRO","NOP","VAL"},$B11)))),7,9)

I would like to implement the condition that if CW =1 and B11 contains
either PRO , NOP or VAL it returns the value 7.

Can anyone help

Thanks

JAmie
 
Try:
=IF(AND(A11=1,OR(ISNUMBER(SEARCH({"PRO","NOP","VAL"},$B11)))),7,9)

P.S. SEARCH() just get the number not the logic result
 
You didn't say what you wanted if this evaluated as false so the formula
shows Unspecified:-

=IF(AND(CW11=1,AND(OR(B11="NOP",B11="PRO",B11="VAL"))),7,"Unspecified")

Mike
 
Change to suit
=IF(AND(E3=1,SUMPRODUCT(--(ISNUMBER(SEARCH({"e*","f*","g"},$F$7))))),"Ok","NO")
 
If you want B11 to be an exact match for either PRO, NOP or VAL, then"

=IF(AND(C11=1,ISNUMBER(MATCH(B11,{"PRO","NOP","VAL"},0))),7,9)

Using SEARCH will return true B11 is "VALLEY". However, using MATCH will
return only if it is exact (non-case sensitive).

HTH,
Paul
 
I have no idea how the * got in there
=IF(AND(E3=1,SUMPRODUCT(--(ISNUMBER(SEARCH({"e","f","g"},$F$7))))),"Ok","NO")
 
Im trying to use the below but not getting much joy.

=IF(AND(CW11=1,OR(SEARCH({"PRO","NOP","VAL"},$B11)))),7,9)

I would like to implement the condition that if CW =1 and B11 contains
either PRO , NOP or VAL it returns the value 7.

Can anyone help

Thanks

JAmie

Dears

use this formula

+IF(AND(CW11=1,SEARCH("PRO",B11)),7,9)

I hope it's what you want

BR

Tariq
 
Im trying to use the below but not getting much joy.

=IF(AND(CW11=1,OR(SEARCH({"PRO","NOP","VAL"},$B11)))),7,9)

I would like to implement the condition that if CW =1 and B11 contains
either PRO , NOP or VAL it returns the value 7.

Can anyone help

Thanks

JAmie

Sorry for the first mail it's error
I will check and reply to you

BR
Tariq
 

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