Google-sheets – Set value of cells based on the value of a cell

google sheets

I have a Google Spreadsheet with a set of tables acting as a "database":
http://prntscr.com/dbbkyv

A table with a number of persons having combinations of items in said database:
http://prntscr.com/dbblhy

And finally a table summing the statistics of the different items:
http://prntscr.com/dbblwe

Color code is as follows: http://prntscr.com/dbbm8w

Green cells are a dropdown list.

How could I have the sum of each stats for each person in table 3?

In this example, Person 1 should have 36 in "Stam" column, 34 in "Int" and 61 in "Spell".

Here is the Google sheet used in the example.

Best Answer

You might try, in B21, C21 and D21 in order:

=vlookup(vlookup($A21;$A$13:$C$16;column();0);$A$4:$D$6;column();0)+vlookup(vlookup($A21;$A$13:$C$16;column()+1;0);$F$4:$I$6;column();0)  

=vlookup(vlookup($a21;$a$13:$c$16;column()-1;0);$a$4:$d$6;column();0)+vlookup(vlookup($a21;$a$13:$c$16;column();0);$f$4:$i$6;column();0)  

=vlookup(vlookup($a21;$a$13:$c$16;column()-2;0);$a$4:$d$6;column();0)+vlookup(vlookup($a21;$a$13:$c$16;column()-1;0);$f$4:$i$6;column();0  

This is complexity purely resulting from the layout you chose.