Here is a custom function you can use on your sheet as long as the lookup table is in the exact format you showed...
A = dates
B = codes
C = historical prices
Those three columns can exist anywhere, but in that order, the array in the function evaluates them in that order.
The the function is used in a cell as:
=NEWESTPRICE(CurrentDate, ProductCode, DateCodeTable)
=NEWESTPRICE(A3, B3, Sheet2!$A$2:$C$12)
Option Explicit
Function NEWESTPRICE(CurrentDate As Date, ProductCode As String, DateCodeTable As Range) As Double
Dim d As Long, Newest As Date
Dim dcARR As Variant
dcARR = DateCodeTable.Value
For d = 1 To UBound(dcARR)
If dcARR(d, 2) = ProductCode Then
If Newest = 0 Then
Newest = dcARR(d, 1)
NEWESTPRICE = dcARR(d, 3)
ElseIf dcARR(d, 1) > Newest Then
Newest = dcARR(d, 1)
NEWESTPRICE = dcARR(d, 3)
End If
End If
Next d
End Function