In Google Spreadsheets, I would like to find a column using a variable matching the column header and sum the column if the match is found.
Example:
-------------------
Ref | X | Y | z |
-------------------
A | 3 | 4 | 2 |
-------------------
B | 2 | 1 | 2 |
-------------------
What I need is to sum all of one column or all of one row (eg. B), not by referring directly to the row reference but by looking up "B" (or filtering "A" out).
How can I do that?