AND OR SEARCH together

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
 
S

Sebation.G

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
 
M

Mike H

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
 
D

Don Guillett

Change to suit
=IF(AND(E3=1,SUMPRODUCT(--(ISNUMBER(SEARCH({"e*","f*","g"},$F$7))))),"Ok","NO")
 
P

PCLIVE

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
 
D

Don Guillett

I have no idea how the * got in there
=IF(AND(E3=1,SUMPRODUCT(--(ISNUMBER(SEARCH({"e","f","g"},$F$7))))),"Ok","NO")
 
A

Al Tariq06

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
 
A

Al Tariq06

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
 
Top