I am written the below source to change the series of graph in Excel VBA (Excel version: 2404 build: 17531.20152 quick execution)
With ActiveSheet.ChartObjects(1). Chart
.SeriesCollection(1). XValues = Range(Cells (11, 1, Cells (2000, 1)) 'x-axis : time
.SeriesCollection(1). Name = Range(Cells (10, 2), Cells (10, 2)) 'series name
.SeriesCollection(1). Values = Range(Cells (11, 2), Cells (2000, 2)) 'y-axis : data
End With
I carried this out, but the series name became the blank on graph.
I am tried the below 2 cases, but the result is same (Blank)
case 1
.SeriesCollection(1). Name = Range(Cells (10, 2)) ‘series name
case 2
.SeriesCollection(1). Name = Range(“J10”) ‘series name
In addition, I was a comment (‘.SeriesCollection(1). Name) and type series name on graph.
I carried a codes of VBA, series name is BLANK.
If there is some correspondence method, please tell me.
Thanks,
kubo
Please give me a advice.
Sho is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.