LastRow = cells(Rows.Count,1).End(xlUp).Row With ActiveSheet.Shapes.AddChart.Chart \'[I have error on this line - Runtime error 1004] .ChartType = xlXYScatterSmoo