SOLVED

IF OR function

Occasional Contributor

I want to set it this way 

If C5= Apple or orange or grape 
E5= Please clean the fruit 

I kept trying if or but cant seem to get it right . If either one of the three are selected in 
c5 the answer should be the same in E5 

7 Replies

@Xeryar 

=IF(OR(LOWER(C5)={"apple","orange","grape"}),"Please clean the fruit","")

Hi @Xeryar 

in E5

=IF(
    OR(
        C5="apple",
        C5="orange",
        C5="grape"
    );
    "Please clean the fruit",
    "Do nothing"
)

an alternative:

=IF(
    SUM(
        COUNTIF(C5,{"apple","orange","grappe"})
    ),
    "Please clean the fruit",
    "Do nothing"
)
=IF(SUM(COUNTIF(E9,{"BIG JOE LIFT TRUCKS-SHANGHAI","I-LIFT EQUIPMENT INC-SHANGHAI}),Please contact the vendor directly","")

=IF(OR(E9="BIG JOE LIFT TRUCKS-SHANGHAI,"I-LIFT EQUIPMENT INC-SHANGHAI");"Please contact the vendor directly,"")

I tried both but they didnt worked
=IF(OR(LOWER(E9)={BIG JOE LIFT TRUCKS-SHANGHAI,"I-LIFT EQUIPMENT INC-SHANGHAI"}),Please contact the vendor directly","")
This didn't worked

@Xeryar 

You forgot some double quotes, and your texts are in upper case instead of lower case.

 

=IF(OR(UPPER(E9)={"BIG JOE LIFT TRUCKS-SHANGHAI","I-LIFT EQUIPMENT INC-SHANGHAI"}),Please contact the vendor directly","")

@Hans Vogelaar hi bud its still not working not sure what i am missing . i have attached the document 

best response confirmed by Xeryar (Occasional Contributor)
Solution

@Xeryar 

See the attached version.