I want to sum the value (and show in any cell) of the cell Cx when Dx is equal to 1 and add the values of Cy when Dy is 2.
For example: In the photo, when the value of cell Dx is 1, I want the value of Cx (of the same line) to go to L3 and thus L3 have the sum of all values of column C that has 1 in column D.