'Sparkline Mismatch VBA

I am stuck in this code, getting a Mismatch error on this line :

Range(Cells(I, 3), Cells(I, 3)).SparklineGroups.Add Type:=xlSparkLine, SourceData:=rg(I)

While I am replacing rg(1) by a classic "B1:B42" the code is working... I've added color to be sure the selected range is the good one, indeed the range only contains double variables.

Thanks for your help,

find attached the entire sub bellow.

Sub sparklines()
cpt = -2
Dim rg() As Range
ReDim rg(ligne)

    For I = 1 To ligne
    nbData = 0
    cpt = cpt + 2
        Do Until Sheets(6).Cells(1 + nbData, cpt + 2) = ""
            nbData = nbData + 1
        Loop
    Set rg(I) = Range(Sheets(6).Cells(1, cpt + 2), Sheets(6).Cells(nbData, cpt + 2))
    Range(Cells(I, 3), Cells(I, 3)).Interior.Color = RGB(220, 150, 150)
    rg(I).Interior.Color = RGB(220, 150, 150)
    Range(Cells(I, 3), Cells(I, 3)).SparklineGroups.Add Type:=xlSparkLine, SourceData:=rg(I)
    Next I


Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source