Start off by creating a table containing the sums for each Item Code using the SUMIF function, e.g.
(please note the ranges and value that I've used probablyy bear no resemblence to yours).
This lookup table can be on the same or a different sheet.
Then on Sheet1, in Column C enter a VLOOKUP formula:
(again no relation to your worksheet).
=VLOOKUP(ITEM CODE, range of lookup table created earlier, column number of lookup table containing the sums, FALSE to return an exact match or an error if the ITEM CODE is not found in the lookup table).