[]
Adds a new conditional format.
IFormatCondition Add(FormatConditionType type, FormatConditionOperator @operator = FormatConditionOperator.Equal, string formula1 = null, string formula2 = null, ContainsOperator textOperator = ContainsOperator.Contains, TimePeriods dateOperator = TimePeriods.Today)
Function Add(type As FormatConditionType, Optional [operator] As FormatConditionOperator = FormatConditionOperator.Equal, Optional formula1 As String = Nothing, Optional formula2 As String = Nothing, Optional textOperator As ContainsOperator = ContainsOperator.Contains, Optional dateOperator As TimePeriods = TimePeriods.Today) As IFormatCondition
Type | Name | Description |
---|---|---|
FormatConditionType | type | Specifies whether the conditional format is based on a cell value or an expression. |
FormatConditionOperator | operator | The conditional format operator. If |
string | formula1 | The value or expression associated with the conditional format. Can be a constant value, a string value, a cell reference, or a formula. |
string | formula2 | The value or expression associated with the second part of the conditional format when Operator is xlBetween or xlNotBetween (otherwise, this argument is ignored). Can be a constant value, a string value, a cell reference, or a formula. |
ContainsOperator | textOperator | The conditional format text operator. If |
TimePeriods | dateOperator | The date operator used in the format condition. |
Type | Description |
---|---|
IFormatCondition | A IFormatCondition object that represents the new conditional format. |
Because formula1
and formula2
are also used for primitive value, the formula must start with "=".
Adds a new conditional format.
IFormatCondition Add(ContainsOperator @operator, string text)
Function Add([operator] As ContainsOperator, text As String) As IFormatCondition
Type | Name | Description |
---|---|---|
ContainsOperator | operator | The conditional format text operator. |
string | text | The text associated with the conditional format. |
Type | Description |
---|---|
IFormatCondition | A IFormatCondition object that represents the new conditional format. |
Adds a new conditional format.
IFormatCondition Add(TimePeriods dateOperator)
Function Add(dateOperator As TimePeriods) As IFormatCondition
Type | Name | Description |
---|---|---|
TimePeriods | dateOperator | The date operator used in the format condition. |
Type | Description |
---|---|
IFormatCondition | A IFormatCondition object that represents the new conditional format. |