SparklineGroup.Modify method (Excel)

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

Syntax

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

Example

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"

Support and feedback

Have questions or feedback about Office VBA or this documentation? Please see Office VBA support and feedback for guidance about the ways you can receive support and provide feedback.