I am trying to sum the table below based on the column headers. I want an input cell, "condition to sum", so I can enter a partial header and then sum accordingly. Example, sum all columns CONTAINING "A", or all columns CONTAINING "Weekly", etc.
The sumif works for only the first line of the sumrange. Have I lost my mind in thinking I can do this with sumif, or am I just missing something in the use of the formula?
I tried using sumproduct, which I really like. Problem is as soon as I think I understand sumproduct, I try to use it in a different way and, WRONG, apparently I do NOT understand it! I could not get it to work at all.
The sample data is below, but the headers are skewed. The link to the Google docs file is also included.
Thanks for any and all suggestions!
Deb
[pre]
[/pre]
https://docs.google.com/open?id=0ByeVouqBkD-KZ0Q3V3UxMXlwa2c
The sumif works for only the first line of the sumrange. Have I lost my mind in thinking I can do this with sumif, or am I just missing something in the use of the formula?
I tried using sumproduct, which I really like. Problem is as soon as I think I understand sumproduct, I try to use it in a different way and, WRONG, apparently I do NOT understand it! I could not get it to work at all.
The sample data is below, but the headers are skewed. The link to the Google docs file is also included.
Thanks for any and all suggestions!
Deb
[pre]
Code:
A - Daily A - Weekly A - Monthly A - Ad Hoc O - Weekly O - Monthly O - Ad Hoc M - Daily M - Weekly M - Monthly M - Ad Hoc
1 11 13 12 20 1 7 12 16 3 8
12 13 6 20 14 9 19 10 12 7 18
11 6 14 20 12 2 4 16 15 13 10
11 3 15 1 16 9 2 5 9 2 3
2 9 1 10 12 12 15 9 2 4 8
sumif yields 37 SUMIF(A1:K1,B10,A2:K6)
should yield 191 SUM(A2:D6)
Condition to Sum A*
https://docs.google.com/open?id=0ByeVouqBkD-KZ0Q3V3UxMXlwa2c