Create a line chart in Excel with this macro. This allows you to quickly and easily create line charts and graphs from a selection of data on the worksheet. As this macro is currently set, the range from which the line chart will be created is a static range that is hard-coded into the macro.
This is a bare-bones version of this macro and is in this fashion so that it is easy to integrate into any other macros that you may be using in Excel.
To use this macro simple replace 'Sheet1'!$A$1:$B$67 with the range cell references of the source data that you would like to use in your chart.
Sub Create_Line_Chart()
'create a line chart in excel with this macro
ActiveSheet.Shapes.AddChart.Select
ActiveChart.SetSourceData Source:=Range("'Sheet1'!$A$1:$B$67")
ActiveChart.ChartType = xlLine
End Sub