I would probably try using "Concatenate" which combines the data for 2 cells into one. You could do that for both the top and bottom sections then do a simple Vlookup:

Column C would look like this (going down)
12
34
23
56
65

You could insert the same formula in the bottom section and then would have 1 number to do a Vlookup with. Would that work?