Since the code is equal to the sheetname, you can also refer to cell a1 and avoid the indirect formula for those cells.