I found something using the macro recorder and turning relative references on. This deletes the original tables so i made a backup in advance. It is not looped but i used i shortkey to spam it.
Sub Order2()
'
ActiveCell.Range("A1:B1").Select
Selection.Copy
ActiveCell.Offset(-2, 39).Range("A1").Select
ActiveSheet.Paste
ActiveCell.Offset(0, 2).Range("A1").Select
Application.CutCopyMode = False
ActiveCell.FormulaR1C1 = "=IFERROR(HLOOKUP(R2C,R[1]C2:R[4]C39,2,0),"""")"
ActiveCell.Select
Selection.AutoFill Destination:=ActiveCell.Range("A1:FB1"), Type:= _
xlFillDefault
ActiveCell.Range("A1:FB1").Select
Selection.Copy
Selection.PasteSpecial Paste:=xlPasteValues, Operation:=xlNone, SkipBlanks _
:=False, Transpose:=False
ActiveCell.Offset(1, 0).Rows("1:4").EntireRow.Select
Application.CutCopyMode = False
Selection.Delete Shift:=xlUp
ActiveCell.Offset(2, 1).Range("A1").Select
End Sub
I have to give credit to the following tutorial: http://www.youtube.com/watch?v=S_bzZpTVmLc
Bookmarks