Components All New MacOS Windows Linux iOS
Examples Mac & Win Server Client Guides Statistic FMM Blog Deprecated Old

XL.ConditionalFormating.AddOpStrRule

Adds a conditional formatting rule that highlights cells whose values are compared with a calculated result, using an operator.

Component Version macOS Windows Linux Server iOS SDK
XL 14.2 ✅ Yes ✅ Yes ✅ Yes ✅ Yes ✅ Yes
MBS( "XL.ConditionalFormating.AddOpStrRule"; bookRef; ConditionalFormattingRef; Operator; ConditionalFormatRef; Value1 { ; Value2; StopIfTrue } )   More

Parameters

Parameter Description Example Flags
bookRef The reference to the workbook. Please use XL.LoadBook to load a file. $ref
ConditionalFormattingRef The reference number for the conditional formatting. $ConditionalFormatting
Operator The operator in the conditional formatting rule, see the list of operators above. 2
ConditionalFormatRef The reference number for the conditional format.
The conditional format used for highlighting cells, use the XL.Book.AddConditionalFormat for adding conditional formats.
$ConditionalFormat
Value1 The string value for the expression with the specified operator.
Value2 The string second optional value for the expression only for some operators. Optional
StopIfTrue If true, no rules with lower priority may be applied over this rule, when this rule is true.
Default is false.
Optional

Result

Returns OK or error.

Description

Adds a conditional formatting rule that highlights cells whose values are compared with a calculated result, using an operator.

NameValueDescription
CFOPERATOR_LESSTHAN0Less than' operator
CFOPERATOR_LESSTHANOREQUAL1Less than or equal to' operator
CFOPERATOR_EQUAL2Equal to' operator
CFOPERATOR_NOTEQUAL3Not equal to' operator
CFOPERATOR_GREATERTHANOREQUAL4Greater than or equal to' operator
CFOPERATOR_GREATERTHAN5Greater than' operator
CFOPERATOR_BETWEEN6Between' operator
CFOPERATOR_NOTBETWEEN7Not between' operator
CFOPERATOR_CONTAINSTEXT8Contains' operator
CFOPERATOR_NOTCONTAINS9Does not contain' operator
CFOPERATOR_BEGINSWITH10Begins with' operator
CFOPERATOR_ENDSWITH11Ends with' operator

See also

Created 30th March 2024, last changed 31st March 2024


XL.ConditionalFormating.AddOpNumRule - XL.ConditionalFormating.AddRange