When you say ‘think of sheet 2 as a db’, then it should have key column to identify a record. The whole point is that sheet2 must also have 3 columns – code, description & price with list of all possible codes to be entered in sheet1.
Then in Sheet1 in B2 enter =VLOOKUP($A2,Sheet2!A:C,2,0)
Then in Sheet1 in C2 enter =VLOOKUP($A2,Sheet2!A:C,3,0)
and drag down as required.
0
solved How to add the result of a formula to another in excel?