|Is your data split into colums?|
NAME GENDER Marks out of 100
If so then this should be pretty straight forward, how will the calculation begin? do you want it to be a running calculation ie the numbers add up as you enter a new entry, or do you want a button that you can press to get the final value?
Here is a possible way of doing it, however the trigger for this is a button. Once you have filled in the entire sheet you press a button or manually run the code and it will calculate the figures for you.
Dim Urange, LRange
Dim BCell As Range
Dim MaleGrades, FemaleGrades As Integer
Set Urange = Sheet1.Range("B2")
Set LRange = Sheet1.Range(Range("B" & Rows.Count).End(xlUp).Address)
For Each BCell In Range(Urange, LRange)
If BCell.Value = "M" Then
MaleGrades = MaleGrades + BCell.Offset(0, 1).Value
ElseIf BCell.Value = "F" Then
FemaleGrades = FemaleGrades + BCell.Offset(0, 1).Value
MsgBox "Male Grades are: " & MaleGrades & vbCrLf _
& "Female Grade are: " & FemaleGrades