Question : Excel dynamic names (functions)

I have a workbook that we track financials for multiple biz uinits.  So there is one sheet called [TEMPLATE] and it has a bunch of named formulas.  We copy this template as we add a new piece of biz.  So I end up  with sheets bizA, bizB etc.  The problem is I end up duplicating all of my named formulas so it looks like this:

Z_Total    = 'template'A20    worksheet
Z_Total   = 'bizA'!A20   worksheet
Z_Total  = 'bizB'!A20  worksheet
etc...

So I would like to do 1 of two things.  Make the formula dynamic and pass the sheetname somehow  (not using indirect)  that seems to be slow.  Or make that function global to the workbook so it can be used on multiple sheets.

thanks experts

Answer : Excel dynamic names (functions)

If you place the current sheet name in a cell, like putting bizB in cell D3 (for example), then your formula can be =INDIRECT("'C:\[FormulaFile.xls]" & D3 & "'!A20)
which will work fine with one caveat -- for it to calculate correctly, that file MUST be open, or you'll get a #REF! error.
Alternatively a macro can also work that shouldn't be too difficult.
 If you need a starter, try recording what you'd have to change.
for example do a global replace of "bizA" with "bizB".
Random Solutions  
 
programming4us programming4us