With the INDIRECT function you don't need the absolute reference so this will suffice:
Formula: copy to clipboard
=IF(B598="",Q598,VLOOKUP(B598,INDIRECT("'["&G598&".xlsx"&"]"&H598&"'!"&"A:AE"),8,0))

As for the column index number, simply replace the 8 with the cell reference, so if the number was in H1 try:
Formula: copy to clipboard
=IF(B598="",Q598,VLOOKUP(B598,INDIRECT("'["&G598&".xlsx"&"]"&H598&"'!"&"A:AE"),H$1,0))
I made the row absolute as I am assuming you will be dragging the formula down without wanting to change the column index number.