0
votes

I'm trying to find a way to get the sum of an array, but only if a cell in the same row(s) contains a specific value. For example, I would like to sum all the values in cells E7:AZ14, if the value in cells C7:C14 = Apple

The way I am currently approaching this - without success - is as follows (an array formula that combines the SUM and VLOOKUP functions):

{=SUM(VLOOKUP("Apple",C7:AZ14,{3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49,50,51,52},0))*C:AZ}

Any help would be greatly appreciated!

1

1 Answers

0
votes

Maybe

=SUMPRODUCT((C7:C14="Apple")*(E7:AZ14))