=SUMIF(range, criteria, sum_range)
where range is (for you) the column of codes (say, A:A), criteria is the code to sum for (in your example, 120), and sum_range is the column with charge amounts (say, B:B). To get the sum of charge amounts associated with code 120, the formula would be:
=SUMIF(A:A, "=120", B:B)
|