Click or drag to resize

ExcelConditionalFormatsCollectionAddCellValueRule(ExcelConditionalFormatOperator, String, String) Method

Adds a rule that formats the cells whose value meets a comparison with one or two values, for example between 10 and 20. Set the font and fill of the cells that meet the condition with the properties of the returned object.

Namespace: ExpertXls.ExcelLib
Assembly: expertxls (in expertxls.dll) Version: 10.0.0
Syntax
public ExcelConditionalFormat AddCellValueRule(
	ExcelConditionalFormatOperator comparisonOperator,
	string value1,
	string value2
)

Parameters

comparisonOperator  ExcelConditionalFormatOperator
The comparison operator.
value1  String
The first value, as an Excel formula without the leading equal sign: a number like "100", a cell reference like "$H$2" or a text in double quotes like "\"North\"".
value2  String
The second value, used by the Between and NotBetween operators. It can be null for the other operators.

Return Value

ExcelConditionalFormat
The new conditional format rule.
See Also