To use SUMIF you have to do it like this (or variation thereof):
=SUMIF(A1:D1,"x",A2:D2) + SUMIF(A1:D1,"x",A3:D3) + SUMIF(A1:D1,"x",A4:D4)
This is because the dimensions of the criteria range (A1:D1) define the dimensions of the sum range. If the criteria range is 1 row deep, then the sum range will be internally recalculated within the function so it is only 1 row deep too. See section 3.2 here for a full explanation.
Of course, you could have a totals row in row 5, and then reference the totals row in your SUMIF formula. So in cell A5 put this:
and copy across. Then your SUMIF formula becomes
Bookmarks