I would like a formula that would look at something similar to the data below. searching and summing data based off 2 criteria...

So I would have a criteria of "a" and "four" and would get a total of 23 (4+19=23)

(sheet1)
one two three four five
a 1 2 3 4 5
b 6 7 8 9 10
c 11 12 13 14 15
a 16 17 18 19 20
b 21 22 23 24 25
c 26 27 28 29 30

(sheet2)

sheet 2 looks something like this, but with the totals filled in the correct spots

a b c
one
two
three
four
five

Please help!