Mise Ă  niveau vers Pro

How to Create Student Registration Form Using MS Excel

 

Creating a Student Registration Form in Microsoft Excel is simple and can be done using form controls and data validation. Follow these steps:

Step 1: Open Excel and Set Up the Sheet

  1. Open Microsoft Excel and create a new worksheet.
  2. Label the columns for student information, such as:
    • A1: Student ID
    • B1: Full Name
    • C1: Date of Birth
    • D1: Gender
    • E1: Contact Number
    • F1: Email Address
    • G1: Course/Department

Step 2: Apply Data Validation

  1. Restrict Date of Birth to Valid Dates

    • Select column C (Date of Birth) → Go to Data → Click Data Validation.
    • Under Allow, choose Date, and set a reasonable date range.
    • Example: Between 01/01/1990 and 01/01/2015.
  2. Create a Drop-down List for Gender

    • Select column D (Gender) → Click Data Validation.
    • Under Allow, choose List, then type:
      Male, Female, Other.
  3. Restrict Contact Number to Numeric Values

    • Select column E (Contact Number).
    • Under Data Validation, choose Whole Number or Text Length to limit digits (e.g., 10 digits for a phone number).
  4. Validate Email Address (Optional)

    • Use this formula in Data Validation → Custom:
      =AND(ISNUMBER(FIND("@", F2)), ISNUMBER(FIND(".", F2)))
    • This ensures that the email contains "@" and "."

Step 3: Create a User-Friendly Form Using Form Controls

  1. Enable Developer Tab

    • Go to FileOptionsCustomize Ribbon.
    • Check Developer and click OK.
  2. Insert a Form

    • Go to Developer Tab → Click Insert.
    • Choose Text Boxes for Name, Contact, and Email.
    • Add Drop-down (Combo Box) for Gender and Course.
  3. Add a Submit Button

    • In Developer Tab → Click InsertButton (Form Control).
    • Assign a macro to move data to a new row when clicked.

Step 4: Automate Data Entry with VBA (Optional)

To make the form functional:

  1. Press Alt + F11 to open VBA Editor.
  2. Insert a new module.
  3. Use this VBA code to save entered data into the next available row:
Sub SubmitForm()
    Dim ws As Worksheet
    Set ws = ThisWorkbook.Sheets("Sheet1") ' Change if needed
    
    Dim lastRow As Long
    lastRow = ws.Cells(ws.Rows.Count, 1).End(xlUp).Row + 1
    
    ws.Cells(lastRow, 1).Value = ws.Range("B2").Value ' Student ID
    ws.Cells(lastRow, 2).Value = ws.Range("B3").Value ' Full Name
    ws.Cells(lastRow, 3).Value = ws.Range("B4").Value ' Date of Birth
    ws.Cells(lastRow, 4).Value = ws.Range("B5").Value ' Gender
    ws.Cells(lastRow, 5).Value = ws.Range("B6").Value ' Contact Number
    ws.Cells(lastRow, 6).Value = ws.Range("B7").Value ' Email Address
    ws.Cells(lastRow, 7).Value = ws.Range("B8").Value ' Course

    MsgBox "Student Registered Successfully!", vbInformation
End Sub
  1. Assign this macro to the Submit Button.

Step 5: Format the Sheet

  • Use Bold Headers and Cell Borders for better visibility.
  • Apply Conditional Formatting to highlight duplicate entries.

Final Steps

  • Test the form by entering sample data.
  • Save the file as .xlsm (Excel Macro-Enabled Workbook) if using VBA.
Flowise Tech https://flowisetech.com