How to Create Excel Student Tracker Macro

Click Here to download the Student Tracker File

Created with 2 Sheets in 1 Workbook

Sheet1 Renamed as “Entry Form” should look like below

How to Create Excel Student Tracker Macro
Excel Student Records Sample1

Sheet2 Rename as Student records should look like below

How to Create Excel Student Tracker Macro
Excel Student Records Sample2

Below is the VBA code was written at the backend

VBA Code of Adding student records

Sub studentrecorder()

Dim tb As ThisWorkbook
Dim Efrm As Worksheet
Dim StrRcrds As Worksheet

Set tb = ThisWorkbook
Set Efrm = tb.Sheets("Entry Form")
Set StrRcrds = tb.Sheets("Student Records")

LastRow = StrRcrds.Cells(StrRcrds.Rows.Count, "A").End(xlUp).Row

If InStr(1, Efrm.Range("I8"), "Please Update") > 0 Then
    MsgBox Efrm.Range("I8")
    Exit Sub
End If

StrRcrds.Range("A" & LastRow + 1) = LastRow
StrRcrds.Range("B" & LastRow + 1) = Efrm.Range("E6")
StrRcrds.Range("C" & LastRow + 1) = Efrm.Range("E7")
StrRcrds.Range("D" & LastRow + 1) = Efrm.Range("E8")
StrRcrds.Range("E" & LastRow + 1) = Efrm.Range("E9")
StrRcrds.Range("F" & LastRow + 1) = Efrm.Range("E10")

MsgBox "Student " & Efrm.Range("E6") & " Added Sucessfully", vbInformation

End Sub

VBA Code of Clearing the Data

Sub Cleardata()

Dim tb As ThisWorkbook
Dim Efrm As Worksheet
Dim StrRcrds As Worksheet

Set tb = ThisWorkbook
Set Efrm = tb.Sheets("Entry Form")
Set StrRcrds = tb.Sheets("Student Records")

Efrm.Range("E6:E10").ClearContents

MsgBox "Cleared Data Sucessfully"

End Sub