PDA

View Full Version : Add Chart to constantly changing stats table



Pancakes1032
04-04-2015, 01:44 PM
Hello,

Right now I have a code that will create a new sheet and table and add all of the collected data into the table. I want to also had a chart at the bottom of the table. I used the record macro to get the basics of the coding to add the table, the problem is the data is constantly changing. The columns and rows expand and extract depending on the amount of data collected for the day.

How do I code it so that the data collected expands the chart as well here:
ActiveChart.SetSourceData Source:=Range("B8:AG8") and here:
ActiveChart.FullSeriesCollection(1).XValues = "='Master log'!$B$2:$AG$2". The ranges need to be able to expand or reduce depending on the table data.

I hope that makes sense. Thanks!