View Single Post
  #2   Report Post  
Bill Manville
 
Posts: n/a
Default

Nate wrote:
Is there a way to use variables in the filename/reference?


You can use the INDIRECT function but it only works if the source files
are open and so is of limited usefulness in a case like yours.

Example, assuming the cost centre number is in B2:
=INDIRECT("'s:\data\[masterfile]" & B2 & "'!B762")

I would suggest it is easier to make your new cost centre by copying an
existing sheet (say for 9440) and then
Edit / Replace / ]9440' [with] ]9441' / Replace All

Bill Manville
MVP - Microsoft Excel, Oxford, England
No email replies please - respond to newsgroup