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')
This is great. it works fine.
Thank you very much.
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')