ab_s
ab_s

Reputation: 57

How can I assign a random name to all charts in excel?

I have a lot of charts in excel which look similar but with different data ranges, however they also have the same chart names. This becomes a problem when I am linking these charts to Powerpoint!

Is there a way to assign a random name to all charts in my workbook?

Upvotes: 1

Views: 68

Answers (1)

Gary's Student
Gary's Student

Reputation: 96753

This will work for sheet-type Charts:

Sub dural()
    For Each Chart In ActiveWorkbook.Charts
        Chart.Name = "Chart" & CStr(Rnd())
    Next
End Sub

Upvotes: 2

Related Questions