편집

다음을 통해 공유


SparklineGroups.Add method (Excel)

Creates a new sparkline group and returns a SparklineGroup object.

Syntax

expression.Add (Type, SourceData)

expression A variable that represents a SparklineGroups object.

Parameters

Name Required/Optional Data type Description
Type Required XlSparkType The type of sparkline.
SourceData Required String Represents the range to use to create the sparkline.

Return value

SparklineGroup

Example

This example adds a sparkline group to the range A1:A4. The sparklines in the group are column sparklines and are bound to the data in the range B1:E4.

Range("$A$1:$A$4").SparklineGroups.Add Type:=xlSparkColumn, SourceData:= _ 
 "Sheet2!B1:E4"

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.