I am trying to do a SUMIF on a data table and I need to use criteria for the row data in the first two columns but also criteria for the column header data. I cannot seem to get this to work.
Example: assume in the table I have years (2010 to 2015) and month values (Jan to Dec) in columns A and B. Then assume I have volume data for a variety of products in columns C to F. And the product names are in the column headers for columns C and F.
If I know in advance that column C has data for "product1" and I wanted volume from 2010 February I would do SUMIFS(C2:C72, A2:A72,"2010", F2:F73,"February").
But I don't know exactly which column has the data for product1 but I do know that it is between columns C and F.
I am trying to widen the "sum range" which is the first term in the SUMIFS as follows: SUMIFS(C2:F72, A2:A72,"2010", F2:F73,"February", A1:F1, "product1"). But this is returning an error. I am effectively trying to use a SUMIF with multiple conditions but two of the conditions pertain to rows and one of the conditions pertains to columns.
There must be a way to do this - like using Index/Match logic but to return an array of results within a SUMIF
Thanks
Example: assume in the table I have years (2010 to 2015) and month values (Jan to Dec) in columns A and B. Then assume I have volume data for a variety of products in columns C to F. And the product names are in the column headers for columns C and F.
If I know in advance that column C has data for "product1" and I wanted volume from 2010 February I would do SUMIFS(C2:C72, A2:A72,"2010", F2:F73,"February").
But I don't know exactly which column has the data for product1 but I do know that it is between columns C and F.
I am trying to widen the "sum range" which is the first term in the SUMIFS as follows: SUMIFS(C2:F72, A2:A72,"2010", F2:F73,"February", A1:F1, "product1"). But this is returning an error. I am effectively trying to use a SUMIF with multiple conditions but two of the conditions pertain to rows and one of the conditions pertains to columns.
There must be a way to do this - like using Index/Match logic but to return an array of results within a SUMIF
Thanks