If you need to perform calculations in a list, you can use database functions in Excel. For example, you can use the function DAVERAGE or DSUM in a list to average or add the values in a column that match certain criteria. Each function uses three arguments (pieces of data) as shown in the following definition: =DSUM (database, field, criteria). Database is the range of cells in the list; field is the columns you want to use; and criteria is the range cells with the conditions. There are other database functions available, such as DCOUNT, DPRODUCT, DMAX, DMIN, and DSTDEV. Each function uses the same arguments.
Use the DSUM or DAVERAGE Function