This question has to have been asked an answered, but I'm not finding it...

PART 1:

Say I have a spreadsheet with a list of Check Numbers, Payees, and Check Amounts.

I want to automatically sum all of the Check Amounts paid to a each Payee in the list.

My thought was to create a another table with a list of of the Payees, and then use a column with a formula that would look up the listed Payee and return a total of all the Check Values paid to that Payee.

What would that formula be?


PART 2:

No lets say I have a list that also includes the Project the employee was working on, so now it is Check Numbers, Project, Payee, Check Amount.

Now I want to create a separate table with a list each Payee on a Project, and I want a formula to tell me the total of checks issued per Payee on a Given Project.

For example, the source table would include:
Check No., Project, Payee, Check Amount
122, House, Joe, $1
123, House, Pete, $5
124, House, Pete, $6
125, House, Joe, $4
126, House, Pete, $5
127, Yard, Joe, $3
128, Yard, Pete, $2
129, Yard, Joe, $1

And I want a table that would show:
Project, Employee, formula to calculate Total Paid
House, Joe, $5
House, Pete, $16
Yard, Joe, $4
Yard, Pete, $2

How would a formula look up the Project and Employee and return a sum of all related payments?

Thanks in advance for any help.