Funny you should ask. I had to figure it out today myself.
I would use the following formula for your issue:
However, I wonder if you want the average rather than the sum. If so, use this formula:
The following is what I did today which used named ranges (I find it easier to read).
I created named ranges. For example: Tax Type is C6:C39 and EnvTotal is D6:D39. I then Multiplied the sum (SUMPRODUCT) by RegularTax which is E2 to get the total tax for the items that were taxed at the regular tax value (“R”).
I hope this helps.
the answer to your query is really simple:
1 name sub marks
2 john english 90
3 maggi maths 15
4 John stats 99
5 john history 35
total marks of john: