EDIT: Title changed for clarity.
Quick summary: I want to know if the behavior of workbook-scoped, worksheet dependent named formulas (which I will
As for the documentation, see Evaluating Names and Other Worksheet Formula Expressions
=A1
refers to cell A1 on the current sheet=!A1
refers to cell A1 on the active sheetin conjunction with Worksheet References
This is what Charles Williams demonstrated. As for your use case, I'd recommend user defined functions, say in VBA.
You need to be careful using !References in Names:
Names with refers-to starting with =! may give incorrect results when calculation is called from VBA. They are calculated as though they always refer to the active worksheet rather than the sheet that they are being used on:
put 1 in cell A1 of Sheet1
a) put =CellA1
in A2 of Sheet1, where CellA1 is defined as =!$A$1
b) switch to manual calculation
c) activate Sheet2
d) run this VBA code
Sub Testing()
Worksheets("Sheet1").Range("a1") = 8
Application.Calculate
End Sub
e) Now switch back to Sheet1 and you will see that Sheet1!A2 contains whatever was in Sheet2!A1
Using indirect() avoids this problem
Our Name Manager addin detects and warns about using this kind of syntax.