I'm building my girlfriend a Google Sheets spreadsheet that will allow her to automatically compute her students' grades based on grades she gives her students on different projects, exams, and participation.
So for homework for example, we may want to give different weight to different assignments. Let's say these are our homeworks and their respective point values (which are then converted to percentages):
- HW #1: 50
- HW #2: 50
- HW #3: 50
- HW #4: 250
For this, I've successfully used SUMPRODUCT, which sums the multipiles of each students grade and the weight of that homework in %. The result is a weighted average for each student.
so for HW #1, if the student got 90% on this assignment, this value would be multiplied by 0.125.
For reference, this is how the formula looks for each student cell:
=IF(ISBLANK(participation!D14), "---", (sumproduct(participation!D14:Z14, participation!$D$11:$Z$11)))
Where D:14:Z14
in participation is the collection of grades for the different assignments. D11:Z11
is the collection of automatically calculated percentage for each assignment.
Where I'm stuck: What if I want to exempt a student? Say Bob didn't do HW #4 because he was sick, right now, as soon as I enter the weight for this assignment (250), this formula causes Bob's average to drop as long as I didn't input a grade for HW #4. How do I skip the multiplication if the grade value in the array is empty? (the weight value might be populated anyway)
Note: I'm an Excel n00b and have put this together mainly by doing research online and coppying snippets and semi-snippets online. I appreciate your patience.
Screenshot of the relevant cells that the formula references: