SparklineGroup.Modify Method (Excel)

Sets the location and the source data for the sparkline group.

Version Added: Excel 2010

expression .Modify(Location, SourceData)

expression A variable that represents a SparklineGroup object.

Parameters

Name

Required/Optional

Data Type

Description

Location

Required

Range

The Range object that represents the location of the sparkline group.

SourceData

Required

String

The range that represents the source data for the sparkline group.

Return Value

Nothing

This examples selects a sparkline group in the location A1:A4 and removes a row of data by changing the sparkline group location to equal A1:A3. The data source must also be modified to only include the first three rows of data.

Range("A1:A4").Select 
ActiveCell.SparklineGroups.Item(1).Modify Location:=Range("$A$1:$A$3"), SourceData:="Sheet1!B1:D3"
Show:
© 2015 Microsoft