Click or drag to resize

ConditionalFormatRuleCollectionAddAboveOrBelowAverage Method

Adds an 'Above or Below Average' conditional formatting rule applied to a specified sequence of references to cell ranges.

Namespace:  GemBox.Spreadsheet.ConditionalFormatting
Assembly:  GemBox.Spreadsheet (in GemBox.Spreadsheet.dll) Version: 43.0.35.1020
Syntax
public AboveOrBelowAverageCondition AddAboveOrBelowAverage(
	string appliesTo,
	bool below
)

Parameters

appliesTo
Type: SystemString
The sequence of references to cell ranges over which the newly added conditional formatting rule is applied.
below
Type: SystemBoolean
if set to format cells with values below average; otherwise, format cells with values above average.

Return Value

Type: AboveOrBelowAverageCondition
A AboveOrBelowAverageCondition set to a newly created conditional formatting rule which can be used to further customize the formatting condition.
Exceptions
ExceptionCondition
ArgumentExceptionParameter appliesTo is or Empty.
Remarks
Newly added rule is inserted at the beginning of the collection so it has the highest priority and is first applied.
See Also