Google-sheets – How to sum a range based on a condition

google sheets

I have columns with "x" and "o" and I want each "x" in a column count as 0.25 and "o" count as 0.125. How could I do this so I have the sum above each column?

In this example it would be = .25 + .125 + .25 + .125 = 0.75

enter image description here

Best Answer

The formula you need would be:

=COUNTIF(F2:F,"x")*0.25+COUNTIF(F2:F,"o")*0.125

OR

=SUM(COUNTIF(F2:F,"x")*0.25,COUNTIF(F2:F,"o")*0.125)

How to sum a range based on a condition

Functions used: