Solved: The problem is in my formula where I'm referencing a cell using INDIRECT() which doesn't work when sheet is different. See answer.
I have a formula in one sheet and what I want to do is to use the formula from another sheet, using eval to evaluate the formula. However, the result is not as intended. It seems like the formula is using values at Sheet A instead of the caller Sheet B.
Formula in sheet A (See: Screenshot Sheet A)
=IF(ISERROR(INDEX('1516Activity'!$B:$B,MATCH(INDIRECT(ADDRESS(ROW(),COLUMN(D:D) )),'1516Activity'!$C:$C,0))),"-",IF(LEFT(INDEX('1516Activity'!$F:$F,MATCH(INDIRECT(ADDRESS(ROW(),COLUMN(D:D) )),'1516Activity'!$C:$C,0)))="0","N","Y"))
Usage in Sheet B (See: Screenshot Sheet B)
=Eval('CODE-VARS'!$G$5)
VBA:
Function Eval(Ref As String)
Application.Volatile
Eval = Application.ThisCell.Parent.Evaluate(Ref)
End Function