Forum Discussion
Conditional formatting with a complex formula
- May 12, 2017
Hi David,
I don't know why but both AND() and OR() don't work within conditional formatting rules if there is INDIRECT used inside. Not sure that's bug or some logic behind, just took that as the fact.
At the same time exactly the same formula within the cell returns correct result.
If re-write your formula as
=(VLOOKUP(INDIRECT("J"&ROW()),Resolved,2,FALSE)="Unresolved")*(INDIRECT("I"&ROW()) < NOW())
which is the equivalent of AND, it shall work with conditional formatting.
I didn't check the formula itself, Detlef suggested another variant without INDIRECT.
Hi David,
I don't know why but both AND() and OR() don't work within conditional formatting rules if there is INDIRECT used inside. Not sure that's bug or some logic behind, just took that as the fact.
At the same time exactly the same formula within the cell returns correct result.
If re-write your formula as
=(VLOOKUP(INDIRECT("J"&ROW()),Resolved,2,FALSE)="Unresolved")*(INDIRECT("I"&ROW()) < NOW())
which is the equivalent of AND, it shall work with conditional formatting.
I didn't check the formula itself, Detlef suggested another variant without INDIRECT.
Hi there,
I am trying to write a logical formula to ease some of my work.
=IF(C2>12,0,IF(AND(C2<12,C2>11,(C2-B2)<1),1))
I couldn't understand what is wrong with this.
It keeps on giving error, could you help me on this?
- SergeiBaklanApr 19, 2018Diamond Contributor
Hi Tuncay,
That is separate question, much better if you start new conversation.
Anyway, in general nothing is wrong with your formula, just copy/paste it into worksheet
- Tuncay SahutogluApr 19, 2018Copper Contributor
Hi Sergei,
Strangely, it still gives error.
I am new at this, how can I solve it?
- SergeiBaklanApr 19, 2018Diamond Contributor
Could you attach a sample file?