Hi all,
I’ve attached a file with a sample of the data that I’m working with.
The data is in cells K3: U13.
I’m trying to produce a series of results in cells C3:F6.
In cells C4:F4 I have a working array function which looks in cells K3:U3 and searches for a value which matches what is in A1. Where it finds that value it will then return the value in cells K4:U4 with the same column number.
With a value of “S2” in cell reference A1, the first match will be found in cell reference O3. The value in row 4 and the same column number is $56.87 and so this is the value that is returned in cell C4.
I’m using an expanding reference so that I can copy the formula across to cell reference F4 and, in each successive column, the next occurrence of the value “S2” will be referenced. This all works well.
However, what I want to be able to do is supplement this formula so that it sums all the values in the referenced column where the value in the Category column matches the value in cell reference A2.
If I was successful in this formula then the value returned in cell reference C6 would have been 302.16; all the values in cell range O4:O13 where the corresponding value in cell range K4:K13 matches the value in cell reference A2.
I was expecting that I would use SUMPRODUCT to complete this formula but that is where I’m getting the error. Perhaps SUMPRODUCT isn’t the best function to use.
Any help to complete this would be appreciated.
Bookmarks