I think that you're probably trying to remember SUMIF().
SUMIF() takes 3 parameters: (range to look through, what to match, range to
sum)
Lets say you have a bunch of names in column A and the amounts they paid in
column B. Your lists go from row 2 down to row 581.
In column C (or any unused column) at row 2 you could put a formula:
=SUMIF(A$2:A$581,A2,B$2:B$581)
and you would see the total paid by the person whose name is in A2 from all
entries on the sheet.
Lets say you also wanted to know how much the totals were for that same
person but from another sheet (with same basic column/row usage), then
=SUMIF(OtherSheet!A$2:A$581,A2,OtherSheet!B$2:B$581) would give you the
total from that other sheet for that person.
Put them together into a single cell and you'd get total from both sheets, as:
=SUMIF(A$2:A$581,A2,B$2:B$581) +
SUMIF(OtherSheet!A$2:A$581,A2,OtherSheet!B$2:B$581)
To carry this one or two steps further so that you don't have to figure out
a way to create a list of unique names in a list, you can use COUNTIF() as a
filter.
Same formula, same 2 sheets involved and same 2 ranges, but you only want to
see the total the first time a name appears in column A:
=IF(COUNTIF($A$2:$A2)=1, SUMIF(A$2:A$581,A2,B$2:B$581) +
SUMIF(OtherSheet!A$2:A$581,A2,OtherSheet!B$2:B$581), "")
should do it for you. This formula can easily be filled down the sheet
through all rows with names on them on the sheet in question. The 'catch'
here is that if there is a name on the "other sheet" that isn't in the list