Create a function using VBA to calculate a students score and letter grade. Use
ID: 3707337 • Letter: C
Question
Create a function using VBA to calculate a students score and letter grade. Use the command button to call the function for arguments: 1) assignments, 2) Midterm 1, 3) Midterm 2 to calculate overall grade. The overall weights for each argument are assignments 30%, Midterm 1 35%, and Midterm 2 35%. Create a function using VBA to calculate a students score and letter grade. Use the command button to call the function for arguments: 1) assignments, 2) Midterm 1, 3) Midterm 2 to calculate overall grade. The overall weights for each argument are assignments 30%, Midterm 1 35%, and Midterm 2 35%.Explanation / Answer
Public Function GetGradeLetter(Score As Double)
Select Case Score
Case Is < 0.6
GetGradeLetter = "F"
Case Is < 0.7
GetGradeLetter = "D"
Case Is < 0.8
GetGradeLetter = "C"
Case Is < 0.9
GetGradeLetter = "B"
Case Else
GetGradeLetter = "A"
End Select
End Function
Related Questions
Hire Me For All Your Tutoring Needs
Integrity-first tutoring: clear explanations, guidance, and feedback.
Drop an Email at
drjack9650@gmail.com
drjack9650@gmail.com
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.