I think what you want is called a pivot table. These are tables that "pivot" on a particular field, essentially grouping them by value. You can then do operations like sum, min, max, etc. on the groups.
http://office.microsoft.com/en-us/excel-help/pivottable-reports-101-HA001034632.aspx