My data would be arranged something like this:
A B C D
ab 1 2 3
cd 4 5 6
ef 7 8 9
gh 2 5 8
(Text in column A and numbers in columns B,C and D)
I would like to sum for "ab" an "cd" across all columns B,C and D. "ab" and "cd" would be linked to cells that I would like to keep variable i.e. I DO NOT want to hard code them in the formula. So if i enter "ab" in "cd" in the linked cells, I should get (1+2+3)+(4+5+6)=21 as the answer. As another example, if i change the linked cells to "gh" and "cd", I should get (2+5+8)+(4+5+6)= 30 as the answer. Please help.
Note: I have tried using sumifs with multiple criteria in the same column, but apparently it cannot handle multiple columns (i cannot add a "total" column in the end because the sumrange would be dynamic). Sumproduct can handle multiple columns but then I would have to hard code the criteria, which I cant (as the criteria would be dynamic as well and there would be more than 50 criteria in some cases).