FWIW whilst others come up with something incredible here would be one UDF approach
called from a cell along the lines of
where
G2: criteria value eg A
B2:B15 is your Col1 range of values
C2:D15 represents your Data values
2 is the parameter denoting which column to sum within the dat value range
So to sum B simply change G2 from A to B (or run another formula)
To sum column C rather than D change 2 to 1
etc...
NOTE:
the final parameter is optional - should you choose to omit this the function will sum all columns simultaneously (ie default col. index of 0)
--so if omitted using example of A you would get output of 65 (35+30)
Bookmarks