Column "E" will have a range of numbered codes that the person submitting the form selects depending on type of expense. Let's say it code be code "96100" or "71000" or "63100".

In another column, column "B", keeps track of the cost of the expense. Cost could be anything and varies greatly.

I would like to be able to paste in a formula that adds up all the expenses that correlate to each expense code. So a total for "96100" and "71000" separately.

I have tried to do this using SUMIF function but can't seem to get it. Any help would be great.