Excel - Conditional Formatting - insert row

前端 未结 16 1593
轮回少年
轮回少年 2021-01-01 11:37

Using Offset or Indirect in \'Applies To\' does not seem to work. Is there any other way to stop conditional formatting from breaking after inserting row/s

16条回答
  •  旧巷少年郎
    2021-01-01 12:29

    Although this is quite old topic, my Excel sheets were also suffering from duplicating conditional formatting when inserting a new row.

    I was able to work around it. Let me share it with others, it might help too.

    In my case, all my conditional formatting rules were applied to the whole table. I realized that only certain rules are duplicated when inserting a new row. These rules are formula based comparing values in different rows.

    In my case, I wanted to render a horizontal border when values of two adjacent rows differ, e.g.:

    =$A2 <> $A1
    

    If I use OFFSET to refer to previous row, all is correct, no duplicated conditional formatting rules.

    =$A2<>OFFSET($A2; -1; 0)
    

    I actually put these conditional formatting formulas into a hidden column but the result should be the same.

提交回复
热议问题