To select all charts or random ones, you can use the chart index.
Sub getcharts() Dim ws As Worksheet Dim ch As ChartObject Set ws = ActiveSheet cnt = ws.ChartObjects.Count random_num = Application.WorksheetFunction.RandBetween(1, cnt) ws.ChartObjects(random_num).Name = "NAM" 'The Random chart For Each ch In ws.ChartObjects ch.Name = "Put the name of Chart here " 'Or Do anything with you all the charts here Next End Sub
source share