Exposes properties which define the value and its unit of measure for a conditional format threshold.

When the valueType property is set to Number, Percentage, or Percentile, only the value property is applicable.

Similarly, the formula property is only applicable whenValueType is set to Formula.

For the following settings of ValueType, neither Value nor Formula is applicable, and the actual threshold is derived based on the highest and/or lowest values in the associated range:

  • AutomaticMinimum
  • AutomaticMaximum
  • LowestValue
  • HighestValue

See

Hierarchy

Hierarchy

  • Base
    • ConditionValue

Implements

  • ISupportFormulaShifts
  • IChangeInfoContext

Constructors

Properties

$type: Type
$t: Type
nextHashCode: number

Accessors

  • 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.

    Throws

    ArgumentException If the value type or value is not appropriate for the condition.

    Throws

    ArgumentOutOfRangeException If the value is out of range.

    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

  • Returns the string representation of this instance.

    Returns string

  • 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