I have quite a large Excel sheet which uses a VBA macro to update and copy values from one sheet into another. I'm looking to optimize the script such that it takes less time to run. The purpose of the macro is to allow for saving historical data while being able to update the value on a display page (as in: historical data on one sheet and current data on another). Historical data is stored in "Daily Avgs (year)' while current data is in "Chem Cost." I'm not very familiar with VBA, but the script I wrote currently works but is horribly unoptimized. Just looking for tips on how I could make this better. Below is a snippet of the script, and is continued for a cumulative trend where the x-axis range is defined.
Thank you.
Sub Daily()
Dim X As Integer
X = WorksheetFunction.Lookup(Range("Look_up_day"), Worksheets("Daily Avgs (year)").Rows("3:3"), Worksheets("Daily Avgs (year)").Rows("2:2"))
Sheets("Chem Cost").Range("ACPT").Copy
Sheets("Daily Avgs (year)").Cells(4, X).Select
Selection.PasteSpecial Paste:=xlPasteValues, Operation:=xlNone, SkipBlanks _
:=False, Transpose:=False
Sheets("Chem Cost").Range("Grade1").Copy
Sheets("Daily Avgs (year)").Cells(18, X).Select
Selection.PasteSpecial Paste:=xlPasteValues, Operation:=xlNone, SkipBlanks _
:=False, Transpose:=False
Sheets("Chem Cost").Range("Grade2").Copy
Sheets("Daily Avgs (year)").Cells(30, X).Select
Selection.PasteSpecial Paste:=xlPasteValues, Operation:=xlNone, SkipBlanks _
:=False, Transpose:=False
Sheets("Chem Cost").Range("Grade3").Copy
Sheets("Daily Avgs (year)").Cells(42, X).Select
Selection.PasteSpecial Paste:=xlPasteValues, Operation:=xlNone, SkipBlanks _
:=False, Transpose:=False
'average cost per thousand squared ft
Sheets("Chem Cost").Range("ACPMSF").Copy
Sheets("Daily Avgs (year)").Cells(91, X).Select
Selection.PasteSpecial Paste:=xlPasteValues, Operation:=xlNone, SkipBlanks _
:=False, Transpose:=False
'x_axis range set up for cumulative trend ($/ton)
'chemA
Sheets("Chem Cost").ChartObjects("Chart 11").Chart.Axes(xlCategory).MinimumScale = Sheets("Daily Avgs (year)").Range("D1").Value
Sheets("Chem Cost").ChartObjects("Chart 11").Chart.Axes(xlCategory).MaximumScale = Sheets("Daily Avgs (year)").Range("G1").Value
'chemB
Sheets("Chem Cost").ChartObjects("Chart 20").Chart.Axes(xlCategory).MinimumScale = Sheets("Daily Avgs (year)").Range("D1").Value
Sheets("Chem Cost").ChartObjects("Chart 20").Chart.Axes(xlCategory).MaximumScale = Sheets("Daily Avgs (year)").Range("G1").Value
'chemC
Sheets("Chem Cost").ChartObjects("Chart 21").Chart.Axes(xlCategory).MinimumScale = Sheets("Daily Avgs (year)").Range("D1").Value
Sheets("Chem Cost").ChartObjects("Chart 21").Chart.Axes(xlCategory).MaximumScale = Sheets("Daily Avgs (year)").Range("G1").Value
'chemD
'...repeated for 40 charts.
End Sub