Ok, so you will click the top Create button to get your worksheets created. Once you have completed your marks, you will click the red 'Get Marks' button, which will send the "C20" value for each student to the Marks column corresponding to their name on the 'StudentList' worksheet.
For a quick test, give Nathan a mark and then click the red button. You will see his mark appear with zeros for all other students (because you have not completed theirs yet).
Spreadsheet Here >> Marking Sheet Template.xlsm
'GetMarks' code:
Sub GetMarks()
Dim ws1 As Worksheet
Dim rngName As Range
Dim rngStudents As Range
Dim calcMode As Long
Set ws1 = ActiveWorkbook.Sheets("StudentList")
With Application
calcMode = .Calculation
.Calculation = xlCalculationManual
.ScreenUpdating = False
.EnableEvents = False
End With
With ws1
Set rngStudents = .Range("C2", .Range("C2").End(xlDown))
End With
For Each rngName In rngStudents
rngName.Offset(0, 1).Value = Sheets(CStr(rngName)).Range("C20").Value
Next
With Application
.Calculation = calcMode
.ScreenUpdating = True
.EnableEvents = True
End With
End Sub
Bookmarks