Sub CONTROL5()
Dim historyWks As Worksheet
Dim inputWks As Worksheet
Dim nextRow As Long
Dim oCol As Long
Dim myRng As Range
Dim myCopy As String
Dim myCell As Range
'cells to copy from Input sheet - some contain formulas
myCopy = "D8,F8,D10,D12,D14,G14,D16,G16,D18,G18,D20,D22,G22,D24,G24,D26,D28,M30,D34,D36,G36"
Set inputWks = Worksheets("DATA SHEET")
Set historyWks = Worksheets("DMD SHEET")
With historyWks
nextRow = .Cells(.Rows.Count, "A").End(xlUp).Offset(1, 0).Row
End With
With inputWks
Set myRng = .Range(myCopy)
End With
With historyWks
With .Cells(nextRow, "A")
.Value = Now
.NumberFormat = "mm/dd/yyyy hh:mm"
End With
.Cells(nextRow, "B").Value = Application.UserName
oCol = 3
For Each myCell In myRng.Cells
historyWks.Cells(nextRow, oCol).Value = myCell.Value
oCol = oCol + 1
Next myCell
End With
Dim c As Range
'clear input cells that contain constants
With inputWks
On Error Resume Next
For Each c In Sheets("DATA SHEET").UsedRange
If c.Locked = False Then
c.Value = ""
End If
Next
Application.GoTo .Cells(1) ', Scroll:=True
On Error GoTo 0
End With
End Sub