It works now. I added cell.Formula = "=index(Sheet1!" & IndexTable.Address (True,True) & ", Match(" & cell.Offset(0, 4).Address(False, True) & ", Sheet1!" & MatchTable.Address(True, True) & ",0))"
This makes the formula like =Index($E$2:$E$2,Match($H2,$E$2:$E$2,0)). There might have been some...