Hi all,
I have excel sheet which is mannually record equiments everyday ,
I would like to create a chart ( see attached file)
Right now , i have to manually do , does anyone can help with the code ?
Thanks,
Mark
Hi all,
I have excel sheet which is mannually record equiments everyday ,
I would like to create a chart ( see attached file)
Right now , i have to manually do , does anyone can help with the code ?
Thanks,
Mark
This is actually a great candidate for trying the macro recorder - so long as you just select the data and add the chart, you won't get lots of annoying extra code.
That said, here is a little snippet of code that you can use to generate the first chart:
ActiveSheet.Shapes.AddChart2(201, xlColumnClustered).Select
ActiveChart.SetSourceData Source:=Range("'Chart '!$A$2:$F$10")
$A$2:$F$10 is the range of the data for the chart.
xlColumnClustered is the type of chart to add.
Here is more info about using AddChart2: https://msdn.microsoft.com/en-us/vba/excel-vba/articles/shapes-addchart2-method-excel
Here is a list of the chart types that you can use: https://msdn.microsoft.com/en-us/vba/excel-vba/articles/xlcharttype-enumeration-excel