Finance

Charts

Statistics

Macros

Search

Line Sparkline In Excel VBA

The following program creates a sparkline of the line type:

Sub CreateLineSparkline()
    ThisWorkbook.Worksheets("Sheet8").Activate
    Range("A11").SparklineGroups.Add xlSparkLine, "A1:A10"
End Sub

Explanation:
The Add() method of the SparklineGroups collection creates a SparklineGroup object in the target cell (here, cell A11).

The first parameter, Type, is set to xlSparkLine from the xlSparkType enumeration, specifying a line sparkline.

The second parameter is a string representing the source data range for the sparkline values (here, cells A1 through A10).

0 0 votes
Évaluation de l'article
S’abonner
Notification pour
guest
0 Commentaires
Le plus ancien
Le plus récent Le plus populaire
Online comments
Show all comments
Facebook
Twitter
LinkedIn
WhatsApp
Email
Print
0
We’d love to hear your thoughts — please leave a commentx