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.
Thank you, Sergei.
That works perfectly.