ICaseWhen
Defines the public contract for the CaseWhen class, exposing validity checks, nested IF output, and category extraction for CASE_WHEN custom formula expressions.
Operations
Valid #
Determine whether the supplied formula can be parsed
Signature:
Public Property Get Valid() As Boolean: End Property
Validation, conversion, and label extraction. Implementations verify the presence of the CASE_WHEN( token at the start of the formula before attempting to parse. Returns False for empty or non-matching strings.
Returns: Boolean. True when the formula is parseable.
parsedFormula #
Retrieve the CASE_WHEN formula rewritten as nested IF statements
Signature:
Public Property Get parsedFormula() As String: End Property
Consumers can feed the resulting expression directly into worksheet formulas. Returns an empty string when the formula is invalid.
Returns: String. Nested IF expression.
Categories #
Enumerate the textual results referenced by the CASE_WHEN expression
Signature:
Public Property Get Categories() As BetterArray: End Property
Each element represents a display label corresponding to a formula branch. Quoted result entries are stripped; non-quoted entries are wrapped in quotes for consistent handling.
Returns: BetterArray. Collection containing quoted labels.