Variable linking.. is this possible?


Posted by Michele on June 14, 2001 3:07 PM

Is there a way to put a variable or a range name in a formula which is a link? Suppose I have a link to +'C:\Financial\May\[may.xls]total'!a1. I know that I can change the link by changing the source in the links box. However, can I make either the whole path, or just the month be a variable? For example, in another cell, can I put C:\Financial\May\[may.xls] and then name that MONTH. In the linked cell can I somehow pull in month? I tried =+&MONTH&total!a1 and a few other things, but that didn't work.

I work in a finance shop and they are looking for an easier way to change all of our links every month. Ideally they just want to be able to put in the new month and have all the links auto update. Thanks!



Posted by Chuck on June 14, 2001 4:44 PM

I think this is what your looking for.

Put the first part of your formula containing the path statement in a separate cell as a TEXT item not a formula. In another cell place the VARIABLE you want to change.

In the third cell the formula should be:
=Indirect(cell1&Cell2)

{Replace cell1 and cell2 in the above with the actual cells you are using}

Hope this helps!