[]
Specifies the operator used by a conditional formatting rule to compare a formula with a cell value, or, for Between and NotBetween, to compare two formulas.
Use this enum with cell-value conditional formatting rules to define how the condition is evaluated. Between and NotBetween require two formula arguments, while the other operators use a single comparison value.
public enum FormatConditionOperator
Public Enum FormatConditionOperator
worksheet.Range["A1:A5"].Value = new object[,] {
{80}, {95}, {110}, {140}, {180}
};
IFormatCondition condition = (IFormatCondition) worksheet.Range["A1:A5"]
.FormatConditions
.Add(FormatConditionType.CellValue, FormatConditionOperator.Between, 100, 150);
condition.Interior.Color = Color.Yellow;
condition.NumberFormat = "0";
| Name | Description |
|---|---|
| Between | Specifes to compare between values. Can only be used if two formulas are provided. |
| Equal | Specifies values are equal. |
| Greater | Specifies values are greater than the condition. |
| GreaterEqual | Specifies values are greater than or equal to the condition. |
| Less | Specifies values are less than the condition. |
| LessEqual | Specifies values are less than or equal to the condition. |
| None | None. |
| NotBetween | Specifies to check if values are not between the conditions. Can only be used if two formulas are provided. |
| NotEqual | Specifies values are not equal. |