ExcelConditionalFormatsCollectionAddFormulaRule Method |
Adds a rule that formats the cells for which a formula evaluates to TRUE, for example "$C2>$D2".
The relative references in the formula are relative to the top left cell of the range, so that each cell
evaluates the formula for its own row or column. 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 AddFormulaRule(
string formula
)
Public Function AddFormulaRule (
formula As String
) As ExcelConditionalFormat
Parameters
- formula String
- The formula, without the leading equal sign.
Return Value
ExcelConditionalFormatThe new conditional format rule.
See Also