Continue to Site

Eng-Tips is the largest engineering community on the Internet

Intelligent Work Forums for Engineering Professionals

  • Congratulations waross on being selected by the Eng-Tips community for having the most helpful posts in the forums last week. Way to Go!

Increment File Name

Status
Not open for further replies.

TCPhoenix

Mechanical
Jan 23, 2007
24
I want am writing some excel formulas that reference other files. Is there a way to increment the file name so I do not have to rewrite the formula for every case. The example i am working on deals with files named WEEK1, and every week a new file will be created WEEK2, WEEK3 etc.

Any thoughts?
 
Replies continue below

Recommended for you

Take a look at the INDIRECT function. So if your first week formula is something like [tt]=WEEK1!$A$1[/tt] you can change that to [tt]=INDIRECT("WEEK"&D1&"!$A$1")[/tt] where the value in cell D1 (on the same worksheet as the formula) is the week number. If you change the value in D1, the week number reference will change. Modify as needed ;-)

Cheers,
Joerd

Please see FAQ731-376 for tips on how to make the best use of Eng-Tips.
 
Hi TCPheonix:

I am not sure if this is what you are looking for ... anyway if your file is named according to current week number, then you can get the current week using the formula ...

=WEEKNUM(TODAY())

Yogi Anand, D.Eng, P.E.
Energy Efficient Building Network LLC
ANAND Enterprises LLC
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor