Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
710
Conditions in formula
posted

Hello,

 

I have a Calcmanager in a grid and it works fine for simple formula.

But now I want to include a formula like: If(([ColumnA] = 'valA' & [ColumnB] = 'ValB'),'A',B')

but it looks like only the second condition ([ColumnB] = 'ValB') is taken into account. How can I combine conditions in a IF statement in a formula? I have tried several things without success.

 

Also, what is the equivalent of 'OR' in such formulas? I would like to have a formula like 

 If(([ColumnA] = 'valA' OR [ColumnA] = 'ValB'),'A',B')

Parents
No Data
Reply
  • 469350
    Verified Answer
    Offline posted

    Hi,

    I'm surprised your initial formula even compiles. The ampersand (&) character is not a logical AND operator in CalcManager formulas and I don't think it's even a valid character.

    What you have to do is use the AND or the OR function. The syntax looks like this:

    AND( [ColumnA] = 'valA', [ColumnB] = 'ValB' )

    so your formula should be:

    If(( AND( [ColumnA] = 'valA', [ColumnB] = 'ValB' ) ),'A',B')

    And it's the same with OR.

    If(( OR ( [ColumnA] = 'valA', [ColumnB] = 'ValB' ) ),'A',B')

Children