Google Spreadsheets Formula – How to Exclude Blank Cells in a Formula

formulasgoogle sheets

I am a music teacher and I use the following formula to calculate my students performance grades:

=100-SUM(F3-5)*-7

How can I change the formula so it only calculates a grade if there is data in the cell?

Additionally I use this formula to calculate the average of my students daily participation/conduct and performance grade:

=100*SUM(G3:H3)/200

Same basic question as above, how can I change the formula so it only runs if there is data in H3 and if there is not the solution equals G3?

Best Answer

Use the IF function, for reference check the following

Google spreadsheets function list

so for the students performance grades, you could use the following

=IF(F3<>"", 100-SUM(F3-5)*-7, "")

and for the students daily participation/conduct and performance grade

=IF(H3<>"", 100*SUM(G3:H3)/200, G3)