SparklineGroup.ModifySourceData method (Excel)

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

Syntax

expression.ModifySourceData (SourceData)

expression A variable that represents a SparklineGroup object.

Parameters

Name Required/Optional Data type Description
SourceData Required String The range that represents the source data.

Return value

Nothing

Example

This example selects a sparkline group in the location A1:A4, and modifies the source data to include an additional column by using the data in the range B1:D4.

Range("A1:A4").Select 
ActiveCell.SparklineGroups.Item(1).ModifySourceData "B1:D4"

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.