Type =SUMIF(range, criteria, [sum_range])
Where Range is the column with the labels (a,b,c) and the criteria is the thing you want to sum - eg all those with the value 'a'
The sum,range is optional but in this case you will need it to enter the range with the numbers.
so say you have lables in column A from cell 1 to 10 and values in colum B your formula would be
=sumif(A1:A10,"a",B1:B10)
check this out on the help filesi in excel as you can use logic within the criteria such as ">5" where you want to only sum items greater than 5.... go read.. :)