Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Sum values from multiple rows using vlookup or index/match functions

I want to sum the values in columns B, C, and D using a formula. I tried combining SUMIF, VLOOKUP and INDEX with MATCH but no luck.

I would like to look for France and then add the values in B, C and D.

I have tried:

=SUM(VLOOKUP(A9,A1:D5,{2,3,4,},FALSE))

But it returns the total value from the first row and does not include the 3rd row:

     A              B                  C                   D
1  FRANCE          152                252                  354
2  ITALY           255                184                  328 
3  FRANCE          221                215                  114
4  SPAIN           215                255                  356
5  USA             125                222                  584
6  
7
8  TOTAL PER COUNTRY
9    FRANCE
10   SPAIN
like image 556
Daniela Avatar asked Nov 29 '14 16:11

Daniela


1 Answers

=SUMPRODUCT((A1:A5="FRANCE")*B1:D5)
like image 182
XOR LX Avatar answered Oct 19 '22 18:10

XOR LX