Looks like the rule is:

If A3 contains a specific "PK" number use the value that is to the left of the PK in A3, look it up in the TDM table and extract the value in column AB,
otherwise find the entire A3 value in the TDM table again extracting column AB.