Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hello
I have a problem using a multiple if statement.
I need to do something like this
if (cond A and cond B and cond C, result 1,
if (cond B and cond C and NOT result 1, result 2,
if ( cond C and NOT result 1 and NOT result 2, result 3)
)
)
can't figure how to do this
Thank you for your help
Regards
Adin
Not sure what the conditions are, but may be this:
If(Cond A and Cond B, 1,
If(Cond B and Cond C, 2
If(Cond C, 3)
)
)
i shouldn't use a b and c
if (cond A and cond B and cond C, result 1,
if (cond D and cond E and NOT result 1, result 2,
if ( cond F and cond G and NOT result 1 and NOT result 2, result 3,
if( NOT result 2 and NOT result 3 and cond A, result 4
)
)
)
)
What i would like to do is to use a resulat as statement in my other IF statement
I think Sunny is right because at the 2nd if you're already excluding result1
so the NOT result 1 (NOT (cond A and cond B and cond C)) is implicit
The same for the 3rd if
if (cond A and cond B and cond C, result 1,
if (cond B and cond C and NOT result 1, result 2,
if ( cond C and NOT result 1 and NOT result 2, result 3)
)
)
Can you may be share some data with your expected output?
I don't have data right now but i can explain my issue
I have multiple if statement.
If an article match some condition then the article's status available, available soon, available online or not available at all.
An article can have only one status.
So i do something like this :
if(conditions,'Available',
if(conditions,'Available soon',
if(conditions,'available online',
if(conditions,'not available at all'
)
)
)
)
What i would like to do is
if(conditions,'Available',
if(conditions and not(Available),'Available soon',
if(conditions and not(Available) and not(Available soon),'available online',
if(conditions and not(Available) and not(Available soon) and not(available online),'not available at all'
)
)
)
)
that's what i thougt
but i have some article with 2 status, which is impossible
when i check manually, it's ok.
So the problem come from the script
I think you have to explain your issue with some data, a text file, an excel, something to try.