Conditional formatting: using row() inside indirect() inside and() doesn't work. What am I doing wrong?

前端 未结 1 1821
心在旅途
心在旅途 2020-12-22 02:11

Say I have set a value of 55 on cell B2.

If it\'s value is 55, the cell\'s background color should be green. So I created a new rule using a formula by selecting \"U

相关标签:
1条回答
  • 2020-12-22 02:49

    The behavior you faced looks like a bug, here are some forum links, where people describe exactly the same problem: link1,link2.

    In one of those topics you can read that if you enclose your CF formula with ISERROR, it returns (for unknown reason) True. Same formula entered in a cell works perfectly fine.

    The easiest solution in your case is to replace:

    =AND(condition1,condition2)
    

    With equivalent:

    =(condition1)*(condition2)
    

    The other workaround shown in one of the linked threads is to replace:

    INDIRECT("B" & row())
    

    With its equivalent:

    INDEX($B:$B,ROW())
    

    Both solutions work fine in conditional formatting rule.

    0 讨论(0)
提交回复
热议问题