After applying macro on Sheet1,go to Sheet2 and to apply the same macro, plse add code
![]()
Dim lastrow As Long Dim selectnum As Long lastrow = Cells(Rows.Count, "a").End(xlUp).Row Select Case True Case lastrow > 30: selectnum = 30 Case lastrow > 20: selectnum = 20 Case lastrow > 10: selectnum = lastrow End Select Cells(lastrow - selectnum + 1, "a").Resize(selectnum, 3).Select Set cht1 = ActiveSheet.Shapes.AddChart cht1.Chart.ChartType = xlLineMarkers cht1.Chart.Location xlLocationAsNewSheet ActiveChart.ChartArea.Select ActiveChart.PlotArea.Select
Bookmarks