I need help how to use "OR" and "IF" functions

Hi , I need help with this expression , I want to use “IF” function with “OR” function , but I don’t know how ???

if(CONTAINS([Resulttext],“a”),“1”, “Monday”)
if(CONTAINS([Resulttext],“b”),“2”, “tuesday”)

OR() - AppSheet Help
IF() - AppSheet Help

Just place your OR inside the first argument of IF

2 Likes

I’m not sure what results you are looking for, try

IFS(
OR(
CONTAINS([ResultText], “a”),
CONTAINS([ResultText], “1”)
),
“Monday”,
OR(
CONTAINS([ResultText], “b”),
CONTAINS([ResultText], “2”)
),
“Tuesday”,
TRUE,
“???”
)

or

IF(
OR(
CONTAINS([ResultText], “a”),
CONTAINS([ResultText], “1”)
),
“Monday”,
IF(OR(
CONTAINS([ResultText], “b”),
CONTAINS([ResultText], “2”)
),
“Tuesday”, “???”)
)

1 Like

I guess you would like to get days name from date, better use TEXT([Date], “DDDD”)

DDD short name of the day of the week (Wed)

DDDD long name of the day of the week (Wednesday)

https://support.google.com/appsheet/answer/10107701?hl=en

2 Likes

hi

OR work likes AND but different

OR(

If(Contains([Resulttext],“a”),“1”,“Monday”),

If(Contains([Resulttext],“b”),“2”,“Tuesday”)

)

1 Like

Thank you for reply … but I get this message error :

Condition OR(IF(CONTAINS([Resulttext],“a”),“1”,“Monday”), IF(CONTAINS([Resulttext],“b”),“2”,“Tuesday”)) has an invalid structure: subexpressions must be Yes/No conditions

1 Like

Great it works… thank you

2 Likes

Apologies. I was meant to start with and() not or(). But realise now from the solution I misunderstood what you were trying to do from your original post.

2 Likes