[COLOR="DarkSlateGray"]Option Explicit
Private Sub Worksheet_Change(ByVal Target As Range)
Dim oCel As Range, s As String
If Not Intersect(Target, [A15:B19]) Is Nothing Then
For Each oCel In Intersect(Target, [A15:B19]).Cells
Application.EnableEvents = False
Cells(oCel.Row, 3).Value = DE(Cells(oCel.Row, 1).Value, Cells(oCel.Row, 2).Value)
Cells(oCel.Row, 8).Value = QU(Cells(oCel.Row, 1).Value, Cells(oCel.Row, 2).Value)
Cells(oCel.Row, 10).Value = PU(Cells(oCel.Row, 1).Value, Cells(oCel.Row, 2).Value)
Application.EnableEvents = True
Next oCel
End If
End Sub
Private Function PU(A As String, B As String)
PU = Evaluate("=OFFSET(INDEX(Code!$A$1:$P$11,MATCH(""" & B & """,OFFSET(Code!$A$1:$A$11,0,MATCH(""" & A & """,Code!$A$1:$P$1,0)-2),0),MATCH(""" & A & """,Code!$A$1:$P$1,0)),0,2)")
If IsError(PU) Then PU = ""
End Function
Private Function QU(A As String, B As String)
QU = Evaluate("=OFFSET(INDEX(Code!$A$1:$P$11,MATCH(""" & B & """,OFFSET(Code!$A$1:$A$11,0,MATCH(""" & A & """,Code!$A$1:$P$1,0)-2),0),MATCH(""" & A & """,Code!$A$1:$P$1,0)),0,1)")
If IsError(QU) Then QU = ""
End Function
Private Function DE(A As String, B As String)
DE = Evaluate("=OFFSET(INDEX(Code!$A$1:$P$11,MATCH(""" & B & """,OFFSET(Code!$A$1:$A$11,0,MATCH(""" & A & """,Code!$A$1:$P$1,0)-2),0),MATCH(""" & A & """,Code!$A$1:$P$1,0)),0,0)")
If IsError(DE) Then DE = ""
End Function[/COLOR]