ExcelConditionalFormatsCollectionAddCellValueRule(ExcelConditionalFormatOperator, String) Method |
Adds a rule that formats the cells whose value meets a comparison with a value, for example greater than 100.
Set the font and fill of the cells that meet the condition with the properties of the returned object.
Namespace: ExpertXls.ExcelLibAssembly: expertxls (in expertxls.dll) Version: 10.0.0
Syntaxpublic ExcelConditionalFormat AddCellValueRule(
ExcelConditionalFormatOperator comparisonOperator,
string value1
)
Public Function AddCellValueRule (
comparisonOperator As ExcelConditionalFormatOperator,
value1 As String
) As ExcelConditionalFormat
Parameters
- comparisonOperator ExcelConditionalFormatOperator
- The comparison operator. For Between
and NotBetween use the overload with two values.
- value1 String
- The value to compare with, 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\"".
Return Value
ExcelConditionalFormatThe new conditional format rule.
See Also