OK so assume LEAD!B38, B39, C38 are to reference SheetXXX!A14, A15, B14 etc then using R1C1
LEAD!B38
=IF(ISREF(INDIRECT("'SheetXXX'!$A$1")),INDIRECT("'SheetXXX'!R[-24]C[-1]",FALSE),"")
copied down and right etc as nec.
Note the first INDIRECT can always reference A1 - it's just checking to see if the sheet exists in the first instance.
If you want to use A1 notation you can and is simple enough if you need only fill vertically, eg:
LEAD!B38
=IF(ISREF(INDIRECT("'SheetXXX'!$A$1")),INDIRECT("'SheetXXX'!A"&14+ROWS(B$38:B38)-1),"")
Bookmarks