Version

StopIfTrue Property

Returns or sets a boolean indicating whether additional formatting rules are evaluated if this rule evaluates to true. Applicable only in the case where the containing collection contains more than one element.
Syntax
'Declaration
 
Public Property StopIfTrue As Boolean
public bool StopIfTrue {get; set;}
Remarks

If a cell value meets more than one condition, the format defined by the first condition takes precedence. Individual format properties are "merged" during the resolution process; for example, if one format has red borders and another has a red foreground color, a cell value which meets both conditions may be formatted with both red borders and a red foreground color.

This property makes it possible to short-circuit the resolution process, so that no other conditional formats are applied after the first condition evaluates to true.

Using the above example, assume StopIfTrue is set to a value of true on the conditional format with red borders, a second conditional format exists with a red foreground color, and a cell value meets both conditions. Because the StopIfTrue setting prevents additional formats from being evaluated, the cell will not show a red foreground color, whereas with StopIfTrue being set to false, it would show both red borders and a red foreground color.

In addition to preventing subsequent conditions from being evaluated, the order in which conditions are evaluated can be controlled using the Priority property.

Requirements

Target Platforms: Windows 10, Windows 8.1, Windows 8, Windows 7, Windows Vista SP1 or later, Windows XP SP3, Windows Server 2008 (Server Core not supported), Windows Server 2008 R2 (Server Core supported with SP1 or later), Windows Server 2003 SP2

See Also