How to sum a column based on existance of value in another column
Solution 1:
The Syntax for SUMIF, according to the relevant microsoft support article:
SUMIF(range, criteria, [sum_range])
For example, the formula =SUMIF(B2:B5, "John", C2:C5) sums only the values in the range C2:C5, where the corresponding cells in the range B2:B5 equal "John."
In your case that would be
=SUMIF(G2:G15, "x", D2:D15)