Export (0) Print
Expand All
This topic has not yet been rated - Rate this topic

SparklineGroup Object (Excel)

Published: July 16, 2012

Represents a group of sparklines.

Version Added: Excel 2010

The SparklineGroup object can contain multiple sparklines and contains the property settings for the group, such as color and axis settings. Each sparkline is represented by a Sparkline object.

Use the Modify method to add or remove sparklines from the sparkline group. Use the ModifyLocation method to change the location of the sparkline and use the ModifySourceData method to change the range of the source data.

The following code example creates a group of column sparklines at the location A1:A4 that are bound to the source data in the range Sheet2!B1:E4. The series color is changed to display the columns in red.

Dim mySG As SparklineGroup 
Set mySG = Range("$A$1:$A$4").SparklineGroups.Add(Type:=xlSparkColumn, SourceData:= _ 
 "Sheet2!B1:E4") 
 
mySG.SeriesColor.Color = RGB(255, 0, 0)
Did you find this helpful?
(1500 characters remaining)
Thank you for your feedback

Community Additions

ADD
Show:
© 2014 Microsoft. All rights reserved.