Defines the criterion for an IconSetConditionalFormat threshold.

This class provides the ability to override the default behavior of the associated condition for the threshold defined by this instance.

For example, the icon displayed for cell values which fall within this threshold is determined by the value of the IconSetConditionalFormat.iconSet, but can be overridden using the icon property.

Similarly, the default unit for this criterion's value is percentage, but this can be overridden using the ConditionValue.valueType property. For example, to define the unit for the value as a specific number, assign a value of Number to the ValueType property.

The value for this threshold is defined by the parent condition, based on the total number of thresholds. For IconSetConditionalFormat.iconSet values which yield three thresholds, for example, the effective value is dependent on the threshold, so that each threshold represents approximately 33% of the associated range. This can be overridden using the CriterionBase.value property; for example, setting the ValueType property to Number and the Value property to a specific number overrides the behavior as defined by the parent condition, and forces the threshold boundary to the specific numeric value.

For this reason, the icon, ConditionValue.value, and ConditionValue.valueType properties support null values, and are in fact set to null by default; this is interpreted by the parent condition as "not set", resulting in the threshold criterion being determined solely by the parent condition.

See

Hierarchy

Hierarchy

Constructors

Properties

$type: Type
$t: Type
nextHashCode: number

Accessors

  • get comparison(): ThresholdComparison
  • Returns or sets a comparison value which determines whether a "greater than" or "greater than or equal to" comparison is made when comparing cell values to the value of this instance.

    Returns ThresholdComparison

  • set comparison(a: ThresholdComparison): void
  • Parameters

    Returns void

  • get formula(): Formula
  • Returns the formula which determines whether cell values meet the criteria defined by the associated condition.

    This property is only applicable when the valueType property is set to Formula.

    To assign a formula, use the setFormula method.

    See

    setFormula

    Returns Formula

  • get value(): number
  • Returns the numeric value for this instance.

    This property is read-only; to assign a value type, use the setValue or setValue methods.

    Note that the unit of measure for this value is determined by the valueType property; for example, when ValueType is set to Number, the value is interpreted as a numeric value, but when set to Percentage, it is interpreted as a percentage.

    See

    Returns number

  • get valueType(): FormatConditionValueType
  • Returns a FormatConditionValueType value which specifies the manner in which the threshold values for this instance are determined.

    This property is read-only; to assign one of the following value types, use the setValue method:

    • AutomaticLowest
    • AutomaticHighest
    • LowestValue
    • HighestValue

    To assign a value type of Number, Percentage, or Percentileuse the setValue method.

    To assign a formula, use the setFormula method.

    See

    setValue

    Returns FormatConditionValueType

Methods

  • Parameters

    • other: any

    Returns boolean

  • Returns number

  • Assigns the specified formula to the formula property, and assigns a value of Formula to the valueType property.

    See

    Parameters

    • formula: string

      The string representation of the formula to be assigned to the value property.

    • Optional cellReferenceMode: CellReferenceMode

      A CellReferenceMode value which specifies whether the 'formula' parameter should be interpreted as an A1 or R1C1 expression. This parameter is optional and defaults to null, in which case the Workbook.cellReferenceMode property is used.

    • Optional valueType: FormatConditionValueType

      A FormatConditionValueType value which specifies the manner in which the value returned from the formula is interpreted. This parameter is optional and defaults to 'Formula'.

    Returns void

  • Sets the valueType property to the specified FormatConditionValueType value.

    The 'valueType' parameter must be set to one of the following values or an exception is thrown:

    • AutomaticLowest
    • AutomaticHighest
    • LowestValue
    • HighestValue

    To set the value property to a numeric value, use the setValue method.

    To set the valueType property to Formula, use the setFormula method.

    Parameters

    Returns void

  • Sets the value and valueType properties to the specified values.

    To set the valueType property to Formula, use the setFormula method.

    To set the valueType property to a FormatConditionValueType value for which the value is not applicable, use the setValue method.

    Parameters

    • value: number

      The new value for the value property.

    • valueType: FormatConditionValueType

      The new value for the valueType property. Must be set to either Number, Percentage, or Percentile or an exception is thrown.

    Returns void

  • Parameters

    • item1: any
    • item2: any

    Returns number

  • Parameters

    • item1: any
    • item2: any

    Returns number

  • Parameters

    • item1: any
    • item2: any

    Returns boolean

  • Parameters

    • a: any
    • b: any

    Returns boolean

  • Parameters

    • obj: any

    Returns any[]

  • Parameters

    • obj: any

    Returns any[]

  • Parameters

    • obj: any

    Returns number

  • Parameters

    • a: any
    • b: any

    Returns boolean