Sub Workbook_Refresher()
ActiveWorkbook.Sheets("FirstSheet").Activate
Dim lastRowDate As Date
lastRowDate = ActiveSheet.Range("B458").<wbr>Value
If Date - lastRowDate >= 7 Then
Dim ws As Worksheet
For Each ws In Worksheets
Select Case ws.Name
Case " FirstSheet ", "ThirdSheet”
Application.GoTo ws.Rows("459:459") 'select last row'
Selection.Delete
Application.GoTo ws.Range("M458")
Selection.Formula = "=L458/C458"
Case "Sheet2Graph", “Sheet4Graph”
Application.GoTo ws.Rows("4:4") 'select top row
Selection.Delete
Application.GoTo ws.Rows("59:59") 'select bottom row
Selection.Delete
End Select
Next ws
For Each oWksht In ActiveWorkbook.Worksheets
For Each oChart In oWksht.ChartObjects
For Each mySrs In oChart.Chart.SeriesCollection
mySrs.Formula = WorksheetFunction.Substitute(<wbr>mySrs.Formula, 57, 58)
Next
Next
Next
End If
For Each oWksht In ActiveWorkbook.Worksheets
For Each oChart In oWksht.ChartObjects
For Each mySrs In oChart.Chart.SeriesCollection
mySrs.Formula = WorksheetFunction.Substitute(<wbr>mySrs.Formula, 58, 58)
Next
Next
Next
ActiveWorkbook.RefreshAll
ActiveWorkbook.Sheets("Sheet2Graph”) Activate
Application.DisplayAlerts = False
ActiveWorkbook.Save
End Sub