#1
|
|||
|
|||
How to Reference an excel file with a changing name
I want to reference an excel file in another excel file. The file I want to reference has a name that changes based on the date that it is updated. How can I set this up? |
#2
|
||||
|
||||
Example(s) of the file names and how they relate to either the current date or a cell with a date in your workbook that wants to gain access to this other file.
Are we talking macro code, formulae, queries? |
#3
|
|||
|
|||
The title is OpsMeeting_8-30-22. Then changes to OpsMeeting_9-6-22 the following week.
|
#4
|
||||
|
||||
If you have a real date in say cell E1 you can put together a file name like this:
="OpsMeeting_" & TEXT(E1,"m-d-yy") & ".xlsx" What you do with that depends on how it's going to be used. Are we talking macros? Or only stuff on a sheet? Is the workbook you're gaining access to open or closed? Are you wanting to refer to a range in that workbook, a table perhaps, a single cell? |
#5
|
|||
|
|||
Are we talking macros? No Macros
Or only stuff on a sheet? Only data on one sheet Is the workbook you're gaining access to open or closed? Open Are you wanting to refer to a range in that workbook, a table perhaps, a single cell? Want to reference a few cells on the sheet. Thanks for replying quickly! |
#6
|
||||
|
||||
If, again, you have a proper Excel date in cell E1, you can refer to cell C3 on sheet Sheet1 of the open file with:
Code:
=INDIRECT("'[OpsMeeting_" & TEXT(E1,"m-d-yy") & ".xlsx]Sheet1'!C3") |
Thread Tools | |
Display Modes | |
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Excel 2000 Backup File Modification Date Not Changing When I Save an XLS File | skeezix | Excel | 3 | 01-10-2021 04:51 PM |
Changing legends in graph if linked excel file is not available? | DatS | Word | 3 | 10-18-2015 05:44 PM |
Changing Field Links in a Word Document from one excel file to another | Fed77 | Word VBA | 9 | 07-08-2015 02:24 AM |
Code for mail merge to reference saved excel file | jtemp57 | Word VBA | 10 | 12-16-2013 11:02 PM |
Changing the Font of Cross-reference | welchs101 | Word | 1 | 06-07-2013 05:07 AM |