Microsoft Office Forums

Go Back   Microsoft Office Forums > >

Reply
 
Thread Tools Display Modes
  #1  
Old 08-24-2022, 10:56 AM
JHalter JHalter is offline Windows 10 Office 2019
Advanced Beginner
How to Reference an excel file with a changing name
 
Join Date: Nov 2021
Posts: 46
JHalter is on a distinguished road
Default 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?
Reply With Quote
  #2  
Old 08-25-2022, 08:35 AM
p45cal's Avatar
p45cal p45cal is offline How to Reference an excel file with a changing name Windows 10 How to Reference an excel file with a changing name Office 2019
Expert
 
Join Date: Apr 2014
Posts: 863
p45cal has a brilliant futurep45cal has a brilliant futurep45cal has a brilliant futurep45cal has a brilliant futurep45cal has a brilliant futurep45cal has a brilliant futurep45cal has a brilliant futurep45cal has a brilliant futurep45cal has a brilliant futurep45cal has a brilliant futurep45cal has a brilliant future
Default

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?
Reply With Quote
  #3  
Old 08-30-2022, 02:04 PM
JHalter JHalter is offline Windows 10 Office 2019
Advanced Beginner
How to Reference an excel file with a changing name
 
Join Date: Nov 2021
Posts: 46
JHalter is on a distinguished road
Default

The title is OpsMeeting_8-30-22. Then changes to OpsMeeting_9-6-22 the following week.
Reply With Quote
  #4  
Old 08-31-2022, 04:55 PM
p45cal's Avatar
p45cal p45cal is offline How to Reference an excel file with a changing name Windows 10 How to Reference an excel file with a changing name Office 2019
Expert
 
Join Date: Apr 2014
Posts: 863
p45cal has a brilliant futurep45cal has a brilliant futurep45cal has a brilliant futurep45cal has a brilliant futurep45cal has a brilliant futurep45cal has a brilliant futurep45cal has a brilliant futurep45cal has a brilliant futurep45cal has a brilliant futurep45cal has a brilliant futurep45cal has a brilliant future
Default

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?
Reply With Quote
  #5  
Old 09-01-2022, 09:16 AM
JHalter JHalter is offline Windows 10 Office 2019
Advanced Beginner
How to Reference an excel file with a changing name
 
Join Date: Nov 2021
Posts: 46
JHalter is on a distinguished road
Default

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!
Reply With Quote
  #6  
Old 09-02-2022, 07:33 AM
p45cal's Avatar
p45cal p45cal is offline How to Reference an excel file with a changing name Windows 10 How to Reference an excel file with a changing name Office 2019
Expert
 
Join Date: Apr 2014
Posts: 863
p45cal has a brilliant futurep45cal has a brilliant futurep45cal has a brilliant futurep45cal has a brilliant futurep45cal has a brilliant futurep45cal has a brilliant futurep45cal has a brilliant futurep45cal has a brilliant futurep45cal has a brilliant futurep45cal has a brilliant futurep45cal has a brilliant future
Default

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")
Reply With Quote
Reply

Thread Tools
Display Modes


Similar Threads
Thread Thread Starter Forum Replies Last Post
How to Reference an excel file with a changing name 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
How to Reference an excel file with a changing name Changing Field Links in a Word Document from one excel file to another Fed77 Word VBA 9 07-08-2015 02:24 AM
How to Reference an excel file with a changing name 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

Other Forums: Access Forums

All times are GMT -7. The time now is 03:51 AM.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2024, vBulletin Solutions Inc.
Search Engine Optimisation provided by DragonByte SEO (Lite) - vBulletin Mods & Addons Copyright © 2024 DragonByte Technologies Ltd.
MSOfficeForums.com is not affiliated with Microsoft