Values Property

Applies To

Scenario Object, Series Object.

Description

Scenario object: Returns an array containing the current values for the scenario changing cells. Read-only.

Series object: Returns or sets a collection of all the values in the series. This can be a range on a worksheet or an array of constant values (but not a combination of both). See the examples for details. Read-write.

Example

This example sets the series values from a range. The example uses the Set statement because the right-hand side of the expression is an object, not a value.


Set Charts("Chart1").SeriesCollection(1).Values = _
    Worksheets("Sheet1").Range("C5:T5")

To assign a constant value to each individual data point, you must use an array. This example does not require the Set statement.


Charts("Chart1").SeriesCollection(1).Values = _
    Array(1, 3, 5, 7, 11, 13, 17, 19)