ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   How Can one display chart series using arrays? (https://www.excelbanter.com/excel-programming/355713-how-can-one-display-chart-series-using-arrays.html)

Alseikhan

How Can one display chart series using arrays?
 

Can anyone help me with this one?
Is it possible to display data in a line chart using arrays only
without having to store data in a range on excel sheet?
I would be very thankful for any tips..

Thanks,
alseikhan


--
Alseikhan
------------------------------------------------------------------------
Alseikhan's Profile: http://www.excelforum.com/member.php...o&userid=32364
View this thread: http://www.excelforum.com/showthread...hreadid=521214


AA2e72E

How Can one display chart series using arrays?
 
This should give you the clues you are seeking:

[The key statement is:

ActiveChart.SeriesCollection(1).Values = "={1,23,32,77}"
]

sub aa()
Charts.Add
ActiveChart.SeriesCollection.NewSeries
ActiveChart.SeriesCollection(1).Values = "={1,23,32,77}"
ActiveChart.Location Whe=xlLocationAsObject, Name:="Sheet1"
With ActiveChart
.HasTitle = False
.Axes(xlCategory, xlPrimary).HasTitle = False
.Axes(xlValue, xlPrimary).HasTitle = False
End With
End Sub

"Alseikhan" wrote:


Can anyone help me with this one?
Is it possible to display data in a line chart using arrays only
without having to store data in a range on excel sheet?
I would be very thankful for any tips..

Thanks,
alseikhan


--
Alseikhan
------------------------------------------------------------------------
Alseikhan's Profile: http://www.excelforum.com/member.php...o&userid=32364
View this thread: http://www.excelforum.com/showthread...hreadid=521214



Alseikhan[_2_]

How Can one display chart series using arrays?
 

Thank you; this should help.

But are you suggesting that I transfer the contents of the array to be
charted into a string containing all the numbers, e.g.,
"={1,2,3,......,60}"?

There isn't a way to set the array directly to the series values?

Thanks again,

Alseikhan


--
Alseikhan
------------------------------------------------------------------------
Alseikhan's Profile: http://www.excelforum.com/member.php...o&userid=32364
View this thread: http://www.excelforum.com/showthread...hreadid=521214



All times are GMT +1. The time now is 03:47 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
ExcelBanter.com