Hi, so ive found out the hard way the disadvamtage of not properly placed data. The problem is i have data coming in of wich certain columns do NOT need to be put in a chart. The charts are dynamic and update according to the length(timescale) and type(categorie/dataserie) the user has selected.
Im fairly new to charts and ive made four charts that represent the four different types the user chooses, now i need to add the dataseries to it trough VBA. I know you can pass an array directly to a dataseries, BUT the problem is i have a dynamic range(Timescale in rows) AND a non continous datarange(Categorys as columns) i need to put in the chart.
In an attempt to simplifiy the code for this(instead of a lot of code to pick each column and find out the number of rows to incorporate) i was thinking of the following:
===============================================
Categorys -> Array(1to3) as range with the last row selected --> (for ex. B6500.end(xlup), D6500.end(xlup),H6500.end(xlup)
Timescale1 -> Ts = -1(for rowoffset)
Timescale20 -> Ts20 (1 to 20) = -1 to -20(for rowoffset)
Timescale50 -> Ts20 (1 to 50) = -1 to -50(for rowoffset)
===============================================
I know from there how to populate the dataseries, but i cant figure out how to do the array for the non-continuous columns. Would this be the best solution and if yes how do i populate that array.
Jape,
Im fairly new to charts and ive made four charts that represent the four different types the user chooses, now i need to add the dataseries to it trough VBA. I know you can pass an array directly to a dataseries, BUT the problem is i have a dynamic range(Timescale in rows) AND a non continous datarange(Categorys as columns) i need to put in the chart.
In an attempt to simplifiy the code for this(instead of a lot of code to pick each column and find out the number of rows to incorporate) i was thinking of the following:
===============================================
Categorys -> Array(1to3) as range with the last row selected --> (for ex. B6500.end(xlup), D6500.end(xlup),H6500.end(xlup)
Timescale1 -> Ts = -1(for rowoffset)
Timescale20 -> Ts20 (1 to 20) = -1 to -20(for rowoffset)
Timescale50 -> Ts20 (1 to 50) = -1 to -50(for rowoffset)
===============================================
I know from there how to populate the dataseries, but i cant figure out how to do the array for the non-continuous columns. Would this be the best solution and if yes how do i populate that array.
Jape,