I think I have got what you wanted.
The Code and Disc. were named data
The codes were named data2
The dropdown box is data validation a list and =data for source.
The vlookup uses tthe table above (data) to look up the values
The sumif function totals on the totals sheet based on the code.
Bookmarks