English Deutsch Français Italiano Español Português 繁體中文 Bahasa Indonesia Tiếng Việt ภาษาไทย
All categories

hi, is there any way i could program a macro where it can automatically read the data inside microsoft excel until the last row and compute them into a line chart? this is because i always need to store in addition data and hope that by just using a button, i will be able to get all the old and new data inside excel to be read and display them into the chart... hope someone will be able to help me thanks

2007-01-30 12:29:44 · 2 answers · asked by tander 2 in Computers & Internet Software

this is the code i using to store the datas into a chart

ActiveSheet.ChartObjects("Chart 12").Activate
ActiveChart.SeriesCollection(1).XValues = "=one!R2C1:R650C1"
ActiveChart.SeriesCollection(1).Values = "=one!R2C3:R650C3"

for this code it only select up to a specific row and if i have more data rows then this, i will have to edit the numbers again, therefore i was wondering if i could edit something on this code so that it would automatically read up till the last row and display all the data into to chart

2007-01-30 16:36:43 · update #1

2 answers

range("a1").End(xlDown).Address will give you address of the last cell

2007-01-30 14:40:50 · answer #1 · answered by unnga 6 · 0 0

Macros/vb are used to do repetitive strikes which you may might desire to do manually. look at youtube and seek for excel macro educational. After observing some you would be making your individual very rapidly.

2016-11-01 22:27:54 · answer #2 · answered by ? 4 · 0 0

fedest.com, questions and answers