Could someone please tell me how to create a chart with data in columns that not in a simple range using VBA e.g.

='Sheet1'!$B$9:$C$9,'Sheet1'!$G$9:$H$9,'Sheet1'!$L$9:$M$9

(three seperate groups of 2 cells)

I'm guessing the range will have to be defined then added to the series collection - this is what i have so for

Public Sub createGraph(theRow As Integer, theSheet As Worksheet)
    Dim c As Chart
    Dim r As Range
    Set c = ThisWorkbook.Charts.Add()
    c.ChartType = xlColumnClustered
    
    'define r
    
    c.SeriesCollection.Add r, xlRows
End Sub