Excel - Conditional Formatting - insert row

前端 未结 16 1639
轮回少年
轮回少年 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条回答
  •  慢半拍i
    慢半拍i (楼主)
    2021-01-01 12:25

    I have found a simple process that seems to work consistently for inserting new rows or columns AND preserves the continuity of the conditional formatting rules (in Office 2010 at least), as follows:

    1. Do a simple "Insert" of your desired number of new rows or columns above, below or left or right of a row or column containing the conditional formatting to be preserved.

    NOTE a) Your conditional formatting is automatically applied to the inserted rows or columns without you having to do anything further. The formatting should have been inherited from the neighboring row or column. b) Any borders formatting should also have been copied to the newly inserted cells.

    1. Select a row, column or range (by clicking it) that is adjacent to the newly inserted ones, and which contains the conditional formatting (and formulas and data if applicable) to be copied.

    2. Hover your mouse over the lower left or lower right corner of the selected range until you see a plus "+" sign appear (don't confuse it with the row re-size gadget as they look similar).

    3. Left click and hold on "+", and drag across the desired rows, columns or range to be formatted, then release.

    NOTE: I create Conditional Formatting rules referencing only one cell: Example) in the field titled "Format values where this formula is true:", create a rule such as ... =AND($B8="",$C8="",$D8="",$K8<>""), where this rule Applies to say the range ... =$B$8:$D$121,$J$8:$M$121.

提交回复
热议问题