0
votes

I need a formula in Sheet 2 column D which will look up the values of columns B and C in Sheet 1 column A and calculate the sum of the values in column C. So for example, D2 will return 36.

Sheet 1: sheet1

Sheet 2 enter image description here

1

1 Answers

2
votes
=ARRAYFORMULA(IFERROR(VLOOKUP(A2:A, QUERY({Sheet1!B:C}, 
 "select Col1, sum(Col2) where Col1 != '' group by Col1", 0), 2, 0)))

0