ok, so I decided to solve it with a match function, where I match column name in the header row. previously I had : =offset(tableName.tableColumn,x,0) and I changed it to
=offset(A1, x, match("columnname", 1:1 (header row), 0)). I find it a little bit dirtier but is the only solution I was able to find.