use a pivot table. http://spreadsheets.about.com/od/dat...ivot_table.htm